From 2bf628be3c1ea310e6a8321c1756f600e53c916f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 13 Mar 2018 09:53:42 -0400 Subject: [PATCH] #4542 Signed-off-by: Kenneth Reitz --- requests/help.py | 6 +++--- requests/types.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/requests/help.py b/requests/help.py index 20df0eaf..a590c946 100644 --- a/requests/help.py +++ b/requests/help.py @@ -10,7 +10,7 @@ import idna import urllib3 import chardet -from typing import Dict +from . import types from . import __version__ as requests_version @@ -25,7 +25,7 @@ else: import cryptography -def _implementation() -> Dict: +def _implementation() -> types.Help: """Return a dict with the Python implementation and version. Provide both the name and the version of the Python implementation @@ -58,7 +58,7 @@ def _implementation() -> Dict: return {'name': implementation, 'version': implementation_version} -def info() -> Dict: +def info() -> types.Help: """Generate information for a bug report.""" try: platform_info = { diff --git a/requests/types.py b/requests/types.py index 69846dde..1744933a 100644 --- a/requests/types.py +++ b/requests/types.py @@ -1,6 +1,6 @@ from typing import ( Callable, Optional, Union, Any, Iterable, List, Mapping, MutableMapping, - Tuple, IO, Text, Type + Tuple, IO, Text, Type, Dict ) from . import auth @@ -46,4 +46,5 @@ Hooks = Optional[MutableMapping[Text, Union[Iterable[_Hook], _Hook]]] Stream = Optional[bool] Verify = Union[None, bool, Text] Cert = Union[Text, Tuple[Text, Text]] -JSON = Optional[MutableMapping] \ No newline at end of file +JSON = Optional[MutableMapping] +Help = Dict \ No newline at end of file