From a20d5c481a09f9b2c18d6cbdbcdfd3f437017265 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 16 Aug 2016 23:41:01 -0400 Subject: [PATCH] Add type stub for typing.get_type_hints (#480) Fixes issue #477 --- stdlib/2.7/typing.pyi | 4 ++++ stdlib/3/typing.pyi | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/stdlib/2.7/typing.pyi b/stdlib/2.7/typing.pyi index 944328fa6..bb08ba397 100644 --- a/stdlib/2.7/typing.pyi +++ b/stdlib/2.7/typing.pyi @@ -338,3 +338,7 @@ class Pattern(Generic[AnyStr]): @overload def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> Tuple[AnyStr, int]: ... + +# Functions + +def get_type_hints(obj: Callable) -> dict[str, Any]: ... diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index 582b863d7..e89daad03 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -406,3 +406,7 @@ class Pattern(Generic[AnyStr]): @overload def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> Tuple[AnyStr, int]: ... + +# Functions + +def get_type_hints(obj: Callable) -> dict[str, Any]: ...