Skip to content

Commit 7fa70e5

Browse files
change variable names in list comprehension
1 parent bd62ddc commit 7fa70e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

climada/entity/impact_funcs/trop_cyclone.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,13 @@ def get_regions_per_countries(
487487
elif code_type == "ISO3N" and isinstance((countries[0]), str):
488488
raise ValueError("ISO3N code type cannot have string values.")
489489

490-
country_dict = getattr(CountryCode, code_type).value
490+
region_country_dict = getattr(CountryCode, code_type).value
491491
# Find region
492492
regions_ids = [
493-
key
493+
region_id
494494
for country in countries
495-
for key, value in country_dict.items()
496-
if country in value
495+
for region_id, countr_in_region_id in region_country_dict.items()
496+
if country in countr_in_region_id
497497
]
498498
# Find impact function id
499499
impf_ids = [CountryCode.IMPF_ID.value[region] for region in regions_ids]

0 commit comments

Comments
 (0)