Skip to content

Commit 4106b7c

Browse files
author
codedawi
committed
🚨 fix linting issue
1 parent 52ef1cd commit 4106b7c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/services/location/jhu.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ async def get_locations():
161161
# Get the timelines.
162162

163163
# TEMP: Fix for merging recovery data. See TODO above for more details.
164-
key = (location['country'], location['province'])
164+
key = (location["country"], location["province"])
165165

166166
timelines = {
167167
"confirmed": location["history"],
@@ -216,15 +216,15 @@ def parse_history(key: tuple, locations: list, index: int):
216216
"""
217217
Helper for validating and extracting history content from
218218
locations data based on index. Validates with the current country/province
219-
key to make sure no index/column issue.
219+
key to make sure no index/column issue.
220220
221221
TEMP: solution because implement a more efficient and better approach in the refactor.
222222
"""
223223
location_history = {}
224224
try:
225225
if key == (locations[index]["country"], locations[index]["province"]):
226226
location_history = locations[index]["history"]
227-
except IndexError or KeyError as e:
228-
LOGGER.warn(f"iteration data merge error: {index} {key}")
229-
230-
return location_history
227+
except (IndexError, KeyError):
228+
LOGGER.debug(f"iteration data merge error: {index} {key}")
229+
230+
return location_history

0 commit comments

Comments
 (0)