summaryrefslogtreecommitdiff
path: root/sphinx/util/requests.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-29 23:56:30 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-30 17:22:56 +0900
commitab184ac20d82d0546c21f33d2fdfbfb324078d56 (patch)
tree225b6c5f9904d8699332add3cb0939fb8be68ef2 /sphinx/util/requests.py
parent7a4bbf372a470700a1dfd96dd57054bb96b92fd3 (diff)
downloadsphinx-git-ab184ac20d82d0546c21f33d2fdfbfb324078d56.tar.gz
mypy: Enable disallow_incomplete_defs flag for type checking
Diffstat (limited to 'sphinx/util/requests.py')
-rw-r--r--sphinx/util/requests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/util/requests.py b/sphinx/util/requests.py
index 4cc73a85f..e5ef40bac 100644
--- a/sphinx/util/requests.py
+++ b/sphinx/util/requests.py
@@ -11,7 +11,7 @@
import sys
import warnings
from contextlib import contextmanager
-from typing import Generator, Union
+from typing import Any, Generator, Union
from urllib.parse import urlsplit
import pkg_resources
@@ -77,7 +77,7 @@ def is_ssl_error(exc: Exception) -> bool:
@contextmanager
-def ignore_insecure_warning(**kwargs) -> Generator[None, None, None]:
+def ignore_insecure_warning(**kwargs: Any) -> Generator[None, None, None]:
with warnings.catch_warnings():
if not kwargs.get('verify') and InsecureRequestWarning:
# ignore InsecureRequestWarning if verify=False
@@ -118,7 +118,7 @@ def _get_user_agent(config: Config) -> str:
])
-def get(url: str, **kwargs) -> requests.Response:
+def get(url: str, **kwargs: Any) -> requests.Response:
"""Sends a GET request like requests.get().
This sets up User-Agent header and TLS verification automatically."""
@@ -134,7 +134,7 @@ def get(url: str, **kwargs) -> requests.Response:
return requests.get(url, **kwargs)
-def head(url: str, **kwargs) -> requests.Response:
+def head(url: str, **kwargs: Any) -> requests.Response:
"""Sends a HEAD request like requests.head().
This sets up User-Agent header and TLS verification automatically."""