mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Add missing descriptor methods in dataclasses and functools (#7203)
This commit is contained in:
@@ -69,7 +69,11 @@ class partialmethod(Generic[_T]):
|
||||
def __init__(self, __func: Callable[..., _T], *args: Any, **keywords: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, __func: _Descriptor, *args: Any, **keywords: Any) -> None: ...
|
||||
def __get__(self, obj: Any, cls: type[Any]) -> Callable[..., _T]: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __get__(self, obj: Any, cls: type[Any] | None = ...) -> Callable[..., _T]: ...
|
||||
else:
|
||||
def __get__(self, obj: Any, cls: type[Any] | None) -> Callable[..., _T]: ...
|
||||
|
||||
@property
|
||||
def __isabstractmethod__(self) -> bool: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
@@ -107,7 +111,7 @@ if sys.version_info >= (3, 8):
|
||||
def register(self, cls: Callable[..., _T], method: None = ...) -> Callable[..., _T]: ...
|
||||
@overload
|
||||
def register(self, cls: type[Any], method: Callable[..., _T]) -> Callable[..., _T]: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _S, cls: type[_S] | None = ...) -> Callable[..., _T]: ...
|
||||
|
||||
class cached_property(Generic[_T]):
|
||||
func: Callable[[Any], _T]
|
||||
|
||||
Reference in New Issue
Block a user