typing_extensions.get_type_hints exists only in 3.7+ (#6283)

This commit is contained in:
Jelle Zijlstra
2021-11-12 07:45:25 -08:00
committed by GitHub
parent 59408d9c9c
commit fecf258b42

View File

@@ -72,14 +72,13 @@ TypedDict: object = ...
OrderedDict = _Alias()
def get_type_hints(
obj: Callable[..., Any],
globalns: dict[str, Any] | None = ...,
localns: dict[str, Any] | None = ...,
include_extras: bool = ...,
) -> dict[str, Any]: ...
if sys.version_info >= (3, 7):
def get_type_hints(
obj: Callable[..., Any],
globalns: dict[str, Any] | None = ...,
localns: dict[str, Any] | None = ...,
include_extras: bool = ...,
) -> dict[str, Any]: ...
def get_args(tp: Any) -> Tuple[Any, ...]: ...
def get_origin(tp: Any) -> Any | None: ...