Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __name__/__qualname__/__wrapped__ to staticmethod/classmethod #6281

Merged
merged 1 commit into from
Nov 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ class staticmethod(object): # Special, only valid as a decorator.
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
def __get__(self, __obj: _T, __type: Type[_T] | None = ...) -> Callable[..., Any]: ...
if sys.version_info >= (3, 10):
__name__: str
__qualname__: str
__wrapped__: Callable[..., Any]
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...

class classmethod(object): # Special, only valid as a decorator.
Expand All @@ -130,6 +133,10 @@ class classmethod(object): # Special, only valid as a decorator.
def __init__(self, __f: Callable[..., Any]) -> None: ...
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
def __get__(self, __obj: _T, __type: Type[_T] | None = ...) -> Callable[..., Any]: ...
if sys.version_info >= (3, 10):
__name__: str
__qualname__: str
__wrapped__: Callable[..., Any]

class type(object):
__base__: type
Expand Down