diff options
| author | 2019-09-09 14:25:01 +0100 | |
|---|---|---|
| committer | 2019-09-09 14:25:01 +0100 | |
| commit | 0a1077c5cdbf2f06c341fca2ef894ef3d6b20e6f (patch) | |
| tree | 52fe551b89a63f1ab3d8a66e97f2abe75d5cd18c /src | |
| parent | change utils.http.request to best-effort detect on-page encoding (diff) | |
| signature | ||
add explicit None return for _find_encoding (mypy)
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/http.py | 1 |
1 files changed, 1 insertions, 0 deletions
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={}, |
