From 972958a406358cca95ccf0e9230f88878557abc5 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Thu, 30 Mar 2023 19:37:15 +0300 Subject: [PATCH] `functools.cached_property.__get__` returns `Self` (#9992) Source code: https://github.com/python/cpython/blob/21e9de3bf0ecf32cd61296009518bfb9fdfcd04f/Lib/functools.py#L979-L980 --- stdlib/functools.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/functools.pyi b/stdlib/functools.pyi index 89560aba3..f96147bae 100644 --- a/stdlib/functools.pyi +++ b/stdlib/functools.pyi @@ -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: ...