Add __name__ to _Wrapped in functools (#9835)

This commit is contained in:
Thomas M Kehrenberg authored and GitHub committed 2023-03-03 15:02:51 +00:00
1 parent 45f0a5e7e4
commit d76259a062
2 files changed
+25 -1

No files matched your search

+3
View File
@@ -72,6 +72,9 @@ WRAPPER_UPDATES: tuple[Literal["__dict__"]]
class _Wrapped(Generic[_PWrapped, _RWrapped, _PWrapper, _RWapper]):
__wrapped__: Callable[_PWrapped, _RWrapped]
def __call__(self, *args: _PWrapper.args, **kwargs: _PWrapper.kwargs) -> _RWapper: ...
# as with ``Callable``, we'll assume that these attributes exist
__name__: str
__qualname__: str
class _Wrapper(Generic[_PWrapped, _RWrapped]):
def __call__(self, f: Callable[_PWrapper, _RWapper]) -> _Wrapped[_PWrapped, _RWrapped, _PWrapper, _RWapper]: ...