diff options
Diffstat (limited to 'sphinx/util/requests.py')
-rw-r--r-- | sphinx/util/requests.py | 8 |
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.""" |