From 0a1077c5cdbf2f06c341fca2ef894ef3d6b20e6f Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 9 Sep 2019 14:25:01 +0100 Subject: [PATCH] add explicit None return for _find_encoding (mypy) --- src/utils/http.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/http.py b/src/utils/http.py index 2f529973..9cfc70a1 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -79,6 +79,7 @@ def _find_encoding(soup: bs4.BeautifulSoup) -> typing.Optional[str]: bs4.Doctype)] or None if doctype and doctype[0] == "html": return "utf8" + return None def request(url: str, method: str="GET", get_params: dict={}, post_data: typing.Any=None, headers: dict={},