functools.cached_property.__get__ returns Self (#9992)

Source code: 21e9de3bf0/Lib/functools.py (L979-L980)
This commit is contained in:
Nikita Sobolev
2023-03-30 19:37:15 +03:00
committed by GitHub
parent 47ce3cb8db
commit 972958a406

View File

@@ -165,7 +165,7 @@ if sys.version_info >= (3, 8):
attrname: str | None
def __init__(self, func: Callable[[Any], _T]) -> None: ...
@overload
def __get__(self, instance: None, owner: type[Any] | None = None) -> cached_property[_T]: ...
def __get__(self, instance: None, owner: type[Any] | None = None) -> Self: ...
@overload
def __get__(self, instance: object, owner: type[Any] | None = None) -> _T: ...
def __set_name__(self, owner: type[Any], name: str) -> None: ...