Skip to content

Commit

Permalink
implement suggested change from WMOkiishi
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Jul 31, 2023
1 parent e591a5b commit 89e9326
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions stdlib/functools.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if sys.version_info >= (3, 9):
_T = TypeVar("_T")
_S = TypeVar("_S")
_P = ParamSpec("_P")
_Q = ParamSpec("_Q")

_PWrapped = ParamSpec("_PWrapped")
_RWrapped = TypeVar("_RWrapped")
Expand Down Expand Up @@ -66,14 +67,22 @@ class _lru_cache_wrapper(Generic[_P, _T]):
def __deepcopy__(self, __memo: Any) -> _lru_cache_wrapper[_P, _T]: ...
if sys.version_info >= (3, 8):
@overload
def __get__(self, __instance: None, __owner: type[_S] | None = ...) -> _lru_cache_wrapper[_P, _T]: ...
def __get__(
self: _lru_cache_wrapper[Concatenate[_S, _Q], _T], __instance: None, __owner: type[_S] | None = ...
) -> Callable[_Q, _T]: ...
@overload
def __get__(self, __instance: _S, __owner: type[_S] | None = ...) -> Callable[Concatenate[_S, _P], _T]: ...
def __get__(
self: _lru_cache_wrapper[Concatenate[_S, _Q], _T], __instance: _S, __owner: type[_S] | None = ...
) -> Callable[_Q, _T]: ...
else:
@overload
def __get__(self, __instance: None, __owner: type[_S] | None) -> _lru_cache_wrapper[_P, _T]: ...
def __get__(
self: _lru_cache_wrapper[Concatenate[_S, _Q], _T], __instance: None, __owner: type[_S] | None
) -> Callable[_Q, _T]: ...
@overload
def __get__(self, __instance: _S, __owner: type[_S] | None) -> Callable[Concatenate[_S, _P], _T]: ...
def __get__(
self: _lru_cache_wrapper[Concatenate[_S, _Q], _T], __instance: _S, __owner: type[_S] | None
) -> Callable[_Q, _T]: ...

if sys.version_info >= (3, 8):
@overload
Expand Down

0 comments on commit 89e9326

Please sign in to comment.