@@ -6,7 +6,6 @@ from typing import Any, Generic, Literal, NamedTuple, TypeVar, overload
66from typing_extensions import Self , deprecated
77
88__all__ = ("Cache" , "FIFOCache" , "LFUCache" , "LRUCache" , "RRCache" , "TLRUCache" , "TTLCache" , "cached" , "cachedmethod" )
9-
109__version__ : str
1110
1211_KT = TypeVar ("_KT" )
@@ -121,24 +120,15 @@ def cached(
121120 key : Callable [..., _KT ] = ...,
122121 lock : AbstractContextManager [Any ] | None = None ,
123122 condition : Condition | None = None ,
124- * ,
125- info : Literal [True ],
123+ info : Literal [True ] = ...,
126124) -> Callable [[Callable [..., _R ]], _cached_wrapper_info [_R ]]: ...
127125@overload
128126def cached (
129127 cache : MutableMapping [_KT , Any ] | None ,
130128 key : Callable [..., _KT ] = ...,
131129 lock : AbstractContextManager [Any ] | None = None ,
132130 condition : Condition | None = None ,
133- * ,
134- info : Literal [False ] = False ,
135- ) -> Callable [[Callable [..., _R ]], _cached_wrapper [_R ]]: ...
136- @overload
137- def cached ( # без параметра info (по умолчанию False)
138- cache : MutableMapping [_KT , Any ] | None ,
139- key : Callable [..., _KT ] = ...,
140- lock : AbstractContextManager [Any ] | None = None ,
141- condition : Condition | None = None ,
131+ info : Literal [False ] = ...,
142132) -> Callable [[Callable [..., _R ]], _cached_wrapper [_R ]]: ...
143133@overload
144134@deprecated ("Passing `info` as positional parameter is deprecated." )
0 commit comments