Skip to content

Commit

Permalink
chore: Ignore ERA001 due to false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 7, 2024
1 parent dae10e2 commit af5c94b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def calculate(item):
# Multiple matches across different types are currently designed to pass. (This assumes users do not coerce
# IDs to strings.) If we change this to a failure, uncomment the following lines.
#
# > elif id_counts_str[str(award_id)] > 1:
# > failed_paths.append(
# > {"path": path, "awardID": award_id, "reason": "multiple awards match the awardID (types differ)"}
# > )
# elif id_counts_str[str(award_id)] > 1:
# failed_paths.append(
# {"path": path, "awardID": award_id, "reason": "multiple awards match the awardID (types differ)"}
# )
else:
pass_count += 1

Expand Down
8 changes: 4 additions & 4 deletions contracting_process/resource_level/reference/parties.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def calculate_path(item, path):
# Multiple matches across different types are currently designed to pass. (This assumes users do not coerce
# IDs to strings.) If we change this to a failure, uncomment the following lines.
#
# > elif id_counts_str[str(ident)] > 1:
# > failed_paths.append(
# > {"path": path, "id": ident, "reason": "multiple parties match the referencing id (types differ)"}
# > )
# elif id_counts_str[str(ident)] > 1:
# failed_paths.append(
# {"path": path, "id": ident, "reason": "multiple parties match the referencing id (types differ)"}
# )
else:
pass_count += 1

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ignore = [
"ARG001", # pika
"D1",
"DTZ",
"ERA001", # commented-out code
"PLR2004", # magic
"PTH",
"D200", # https://github.com/astral-sh/ruff/issues/6269
Expand Down
24 changes: 12 additions & 12 deletions workers/extract/dataset_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ def start():


# Sample message:
# > {
# > "dataset_id_original": 2,
# > "filter_message": {
# > "release_date_from": '2019-12-02',
# > "release_date_to": '2020-02-02',
# > "buyer": ["ministry_of_finance", "state"],
# > "buyer_regex": "Development$",
# > "procuring_entity": ["a", "b"],
# > "procuring_entity_regex": "(a|b)casdf+"
# > },
# > "max_items": 5000
# > }
# {
# "dataset_id_original": 2,
# "filter_message": {
# "release_date_from": '2019-12-02',
# "release_date_to": '2020-02-02',
# "buyer": ["ministry_of_finance", "state"],
# "buyer_regex": "Development$",
# "procuring_entity": ["a", "b"],
# "procuring_entity_regex": "(a|b)casdf+"
# },
# "max_items": 5000
# }
def callback(client_state, channel, method, properties, input_message):
cursor = get_cursor()

Expand Down

0 comments on commit af5c94b

Please sign in to comment.