Skip to content

Commit

Permalink
VA: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jessemortenson committed Nov 5, 2024
1 parent c23d234 commit e5b3ddf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scrapers/va/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ def add_votes(self, bill: Bill, legislation_id: str):
# and right now OS core requires a pass or fail, so we skip them with a notice
# also skip rows that correspond to a bill action that does not indicate a vote by presence of ##-Y / ##-N
# if we don't skip on that last criteria, we get duplicate vote events
if ((row["PassFail"] or row["IsVoice"] is not True)
and vote_shorthand_regex.search(row["LegislationActionDescription"])):
if (
row["PassFail"] or row["IsVoice"] is not True
) and vote_shorthand_regex.search(row["LegislationActionDescription"]):
vote_date = dateutil.parser.parse(row["VoteDate"]).date()

motion_text = row["VoteActionDescription"]
Expand All @@ -261,8 +262,10 @@ def add_votes(self, bill: Bill, legislation_id: str):

# BatchNumber is not unique to an individual Vote Event, so we need to add context
# in order to avoid duplicate dedupe keys
v.dedupe_key = (f"{row['BatchNumber'].strip()}-{bill.identifier.strip()}-"
f"{row['LegislationActionDescription'].strip()}`")[:500]
v.dedupe_key = (
f"{row['BatchNumber'].strip()}-{bill.identifier.strip()}-"
f"{row['LegislationActionDescription'].strip()}`"
)[:500]

tally = {
"Y": 0,
Expand Down

0 comments on commit e5b3ddf

Please sign in to comment.