Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix cache should be positional-only
  • Loading branch information
alwaysmpe committed Nov 3, 2024
commit fd0d180e957347fd7280a7e9fa70bbb8ef86c3c2
6 changes: 3 additions & 3 deletions stdlib/functools.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ if sys.version_info >= (3, 10):
def lru_cache(maxsize: _ProtoFunction[_P, _R], typed: bool = False) -> _FunctionDescriptor[_P, _R] | _FnHashable[_P, _R]: ...
@overload
def cache(
user_function: _ProtoMethod[_T, _P, _R]
user_function: _ProtoMethod[_T, _P, _R], /
) -> _MethodDescriptor[_T, _P, _R] | _FnHashable[Concatenate[_T, _P], _R]: ...
@overload
def cache(user_function: _ProtoClassmethod[_T, _P, _R]) -> _ClassmethodDescriptor[_T, _P, _R] | _ClsHashable[_T, _P, _R]: ...
def cache(user_function: _ProtoClassmethod[_T, _P, _R], /) -> _ClassmethodDescriptor[_T, _P, _R] | _ClsHashable[_T, _P, _R]: ...
@overload
def cache(user_function: _ProtoFunction[_P, _R]) -> _FunctionDescriptor[_P, _R] | _FnHashable[_P, _R]: ...
def cache(user_function: _ProtoFunction[_P, _R], /) -> _FunctionDescriptor[_P, _R] | _FnHashable[_P, _R]: ...

else:
@final
Expand Down