Skip to content

Commit

Permalink
Add assertion to fix mypy error (aio-libs#3927)
Browse files Browse the repository at this point in the history
(MatchObject.lastindex may be None)
  • Loading branch information
AMDmi3 committed Aug 13, 2019
1 parent 6e9bc7f commit 7e38008
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aiohttp/cookiejar.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ def _parse_date(cls, date_str: str) -> Optional[datetime.datetime]:
month_match = cls.DATE_MONTH_RE.match(token)
if month_match:
found_month = True
assert(month_match.lastindex is not None)
month = month_match.lastindex
continue

Expand Down

0 comments on commit 7e38008

Please sign in to comment.