Skip to content

Commit

Permalink
chore: Avoid unnecessary assignment before for-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 28, 2024
1 parent 778d259 commit cfbe599
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,7 @@ def _merge_codes(sources, fieldnames, basename, ignore, oc4ids_codes, oc4ids_row
seen = []

for source in sources:
reader = csv_reader(f"{ocds_base_url if source == 'OCDS' else ppp_base_url}codelists/{basename}")
for row in reader:
for row in csv_reader(f"{ocds_base_url if source == 'OCDS' else ppp_base_url}codelists/{basename}"):
if row["Code"] not in seen and row["Code"] not in ignore:
seen.append(row["Code"])
_edit_code(row, oc4ids_codes, source)
Expand Down Expand Up @@ -1134,7 +1133,6 @@ def _get_paths(d, path=""):
mapping = yaml.safe_load(f)

mapping = {element["id"]: element for element in mapping}

for element in mapping.values():
if element["example"] != "":
example = element["example"]
Expand Down

0 comments on commit cfbe599

Please sign in to comment.