Skip to content

Commit

Permalink
local variable 'e' referenced before assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
solesensei committed Sep 21, 2021
1 parent 629fad7 commit f745ffe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ngl/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def _parse_date(date_str: tp.Optional[str]):
if not date_str:
return None
check_date_formats = (r"%d %b, %Y", r"%b %d, %Y", r"%b %Y")
e = None
for fmt in check_date_formats:
try:
return datetime.strptime(date_str, fmt).date()
Expand Down

0 comments on commit f745ffe

Please sign in to comment.