Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/twfy_tools/db/model_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def field(
"""
if args:
raise ValueError("Positional arguments are not supported")
kwargs["null"] = null
kwargs["null"] = null # type: ignore
if isinstance(model_class, type) and issubclass(model_class, models.Field):
return model_class(**kwargs)
else:
Expand Down
6 changes: 3 additions & 3 deletions src/twfy_tools/utils/personinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ def load_statement_signatures(quiet: bool = False):
"""
Upload signatures of EDMs, open letters, and negative SI requests (motions to annul)
"""
min_edm_date = datetime.date.today() - pd.offsets.DateOffset(months=3)
min_edm_date = datetime.date.today() - pd.offsets.DateOffset(months=3) # type: ignore
min_edm_date = min_edm_date.date()

min_letter_date = datetime.date.today() - pd.offsets.DateOffset(years=1)
min_letter_date = datetime.date.today() - pd.offsets.DateOffset(years=1) # type: ignore
min_letter_date = min_letter_date.date()

min_annul_date = datetime.date.today() - pd.offsets.DateOffset(years=1)
min_annul_date = datetime.date.today() - pd.offsets.DateOffset(years=1) # type: ignore
min_annul_date = min_annul_date.date()

statements = pd.read_parquet(statements_url)
Expand Down
4 changes: 2 additions & 2 deletions src/twfy_tools/utils/votes2db.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ def process_policy_json():

for policy_data in data:
# we might not end up saving it, but creating a policy obj
contains_free_vote = 0
contains_free_vote = False
if len(policy_data["free_vote_parties"]) > 0:
contains_free_vote = 1
contains_free_vote = True
policy = Policy(
policy_id=str(policy_data["id"]),
title=policy_data["name"],
Expand Down
Loading