diff options
author | Nate Prewitt <nate.prewitt@gmail.com> | 2018-06-14 07:39:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-14 07:39:13 -0700 |
commit | cd4762d5a3b56d8933d1d9c1dff365fc5db4c768 (patch) | |
tree | 7527463d2cef00a5bc3bae79f4a27574e65f37a5 | |
parent | 8f3f022c54db7c8348c84c079dfe7f7c354f1062 (diff) | |
parent | 2bbe38fd8b5ea2bbd5873ff286659d3c1abadec8 (diff) | |
download | python-requests-3.0.tar.gz |
Merge pull request #4551 from RatanShreshtha/3.03.0
Updated types in __init__.py according to types.py
-rw-r--r-- | requests/__init__.py | 5 | ||||
-rw-r--r-- | requests/types.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/requests/__init__.py b/requests/__init__.py index 5c299a8f..c0164247 100644 --- a/requests/__init__.py +++ b/requests/__init__.py @@ -42,9 +42,10 @@ import urllib3 import chardet import warnings from .exceptions import RequestsDependencyWarning +from .import types -def check_compatibility(urllib3_version: str, chardet_version: str) -> None: +def check_compatibility(urllib3_version: types.String, chardet_version: types.String) -> None: urllib3_version = urllib3_version.split('.') # type: ignore assert urllib3_version != [ 'dev' @@ -68,7 +69,7 @@ def check_compatibility(urllib3_version: str, chardet_version: str) -> None: assert patch >= 2 # type: ignore -def _check_cryptography(cryptography_version: str) -> None: +def _check_cryptography(cryptography_version: types.String) -> None: # cryptography < 1.3.4 try: cryptography_version = list( diff --git a/requests/types.py b/requests/types.py index 4b609867..0ea5d7b6 100644 --- a/requests/types.py +++ b/requests/types.py @@ -68,3 +68,5 @@ Host = str Sequence = List Filename = str KeyValueList = List[Tuple[Text, Text]] +String = str +Boolean = Union[bool, None] |