Skip to content
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
11 changes: 11 additions & 0 deletions stdlib/3/functools.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...