From f745ffe580a0a35ddfbc2c446439cf28dc3143ec Mon Sep 17 00:00:00 2001 From: SoleSensei Date: Tue, 21 Sep 2021 11:45:43 +0300 Subject: [PATCH] local variable 'e' referenced before assignment --- ngl/client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ngl/client.py b/ngl/client.py index 94afad2..6c052f1 100644 --- a/ngl/client.py +++ b/ngl/client.py @@ -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()