From 761b9945451d38214824e0e2e7bd5475f5074fae Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 16 Jan 2022 17:01:47 -0800 Subject: [PATCH] Remove staticmethod.__new__ and classmethod.__new__ It's not clear from the stub why these exist; they just have *args/**kwargs and a generic signature. Does anyone know of a good reason for these to be in the stub? --- stdlib/builtins.pyi | 2 -- 1 file changed, 2 deletions(-) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index a94b08140131..dcf4b6eb8377 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -115,7 +115,6 @@ class staticmethod(Generic[_R]): __func__: Callable[..., _R] __isabstractmethod__: bool def __init__(self: staticmethod[_R], __f: Callable[..., _R]) -> None: ... - def __new__(cls: type[Self], *args: Any, **kwargs: Any) -> Self: ... def __get__(self, __obj: _T, __type: type[_T] | None = ...) -> Callable[..., _R]: ... if sys.version_info >= (3, 10): __name__: str @@ -127,7 +126,6 @@ class classmethod(Generic[_R]): __func__: Callable[..., _R] __isabstractmethod__: bool def __init__(self: classmethod[_R], __f: Callable[..., _R]) -> None: ... - def __new__(cls: type[Self], *args: Any, **kwargs: Any) -> Self: ... def __get__(self, __obj: _T, __type: type[_T] | None = ...) -> Callable[..., _R]: ... if sys.version_info >= (3, 10): __name__: str