mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
committed by
Jelle Zijlstra
parent
f39c102eb8
commit
add0b5e930
@@ -76,3 +76,14 @@ class _SingleDispatchCallable(Generic[_T]):
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
|
||||
|
||||
def singledispatch(func: Callable[..., _T]) -> _SingleDispatchCallable[_T]: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
class cached_property(Generic[_S, _T]):
|
||||
func: Callable[[_S], _T]
|
||||
attrname: Optional[str]
|
||||
def __init__(self, func: Callable[[_S], _T]) -> None: ...
|
||||
@overload
|
||||
def __get__(self, instance: None, owner: Optional[Type[_S]] = ...) -> cached_property[_S, _T]: ...
|
||||
@overload
|
||||
def __get__(self, instance: _S, owner: Optional[Type[_S]] = ...) -> _T: ...
|
||||
def __set_name__(self, owner: Type[_S], name: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user