From dbaf4c63908cd10622aeb375cdf9c5b58d725651 Mon Sep 17 00:00:00 2001 From: James <50501825+Gobot1234@users.noreply.github.com> Date: Tue, 4 May 2021 02:33:29 +0100 Subject: [PATCH] Improve ``type.__new__`` (#5331) Fixes #3386 --- stdlib/builtins.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 551365cdd..4ca869ff8 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -145,7 +145,7 @@ class type(object): @overload def __new__(cls, o: object) -> type: ... @overload - def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any], **kwds: Any) -> type: ... + def __new__(cls: Type[_TT], name: str, bases: Tuple[type, ...], namespace: Dict[str, Any], **kwds: Any) -> _TT: ... def __call__(self, *args: Any, **kwds: Any) -> Any: ... def __subclasses__(self: _TT) -> List[_TT]: ... # Note: the documentation doesnt specify what the return type is, the standard