Fix mypy error for github module

This commit is contained in:
mmayank 2019-10-13 16:08:55 +05:30
parent cc4173ff52
commit 910f737b87

View file

@ -56,8 +56,8 @@ def page_from_response(page: str, response: Response) -> Optional[int]:
if page_link: if page_link:
parsed = urlparse.urlparse(page_link.get("url")) parsed = urlparse.urlparse(page_link.get("url"))
params = urlparse.parse_qs(parsed.query) params = urlparse.parse_qs(parsed.query)
page = params.get('page') or [None] pages = params.get('page', [None])
page_number = page[0] and int(page[0]) page_number = pages[0] and int(pages[0])
return page_number return page_number
else: else:
return None return None