Skip to content

Commit 0c2b59c

Browse files
committed
[cachetools] More improvements for 7.0.* (#15357)
1 parent 8b3732b commit 0c2b59c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

stubs/cachetools/cachetools/__init__.pyi

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def cached(
135135
key: Callable[..., _KT] = ...,
136136
lock: AbstractContextManager[Any] | None = None,
137137
condition: _AbstractCondition | None = None,
138-
info: Literal[True] = ...,
138+
*,
139+
info: Literal[True],
139140
) -> Callable[[Callable[..., _R]], _cached_wrapper_info[_R]]: ...
140141
@overload
141142
def cached(
@@ -150,7 +151,7 @@ class _cachedmethod_wrapper(Generic[_R]):
150151
__wrapped__: Callable[..., _R]
151152
__name__: str
152153
__doc__: str | None
153-
cache: MutableMapping[Any, Any] | None
154+
cache: MutableMapping[Any, Any]
154155
cache_key: Callable[..., Any] = ...
155156
cache_lock: AbstractContextManager[Any] | None = None
156157
cache_condition: _AbstractCondition | None = None
@@ -167,7 +168,8 @@ def cachedmethod(
167168
key: Callable[..., _KT] = ...,
168169
lock: Callable[[Any], AbstractContextManager[Any]] | None = None,
169170
condition: Callable[[Any], _AbstractCondition] | None = None,
170-
info: Literal[True] = ...,
171+
*,
172+
info: Literal[True],
171173
) -> Callable[[Callable[..., _R]], _cachedmethod_wrapper_info[_R]]: ...
172174
@overload
173175
def cachedmethod(

0 commit comments

Comments
 (0)