mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 21:01:52 +08:00
cachetools ttl should be float (#4668)
This commit is contained in:
2
third_party/2and3/cachetools/func.pyi
vendored
2
third_party/2and3/cachetools/func.pyi
vendored
@@ -8,4 +8,4 @@ _RET = Callable[[_F], _F]
|
||||
def lfu_cache(maxsize: int = ..., typed: bool = ...) -> _RET: ...
|
||||
def lru_cache(maxsize: int = ..., typed: bool = ...) -> _RET: ...
|
||||
def rr_cache(maxsize: int = ..., choice: Optional[Callable[[Sequence[_T]], _T]] = ..., typed: bool = ...) -> _RET: ...
|
||||
def ttl_cache(maxsize: int = ..., ttl: int = ..., timer: float = ..., typed: bool = ...) -> _RET: ...
|
||||
def ttl_cache(maxsize: int = ..., ttl: float = ..., timer: float = ..., typed: bool = ...) -> _RET: ...
|
||||
|
||||
4
third_party/2and3/cachetools/ttl.pyi
vendored
4
third_party/2and3/cachetools/ttl.pyi
vendored
@@ -7,7 +7,7 @@ _VT = TypeVar("_VT")
|
||||
|
||||
class TTLCache(Cache[_KT, _VT]):
|
||||
def __init__(
|
||||
self, maxsize: int, ttl: int, timer: Callable[[], float] = ..., getsizeof: Optional[Callable[[_VT], int]] = ...
|
||||
self, maxsize: int, ttl: float, timer: Callable[[], float] = ..., getsizeof: Optional[Callable[[_VT], int]] = ...
|
||||
) -> None: ...
|
||||
def __getitem__(self, key: _KT, cache_getitem: Callable[[_KT], _VT] = ...) -> _VT: ...
|
||||
def __setitem__(self, key: _KT, value: _VT, cache_setitem: Callable[[_KT, _VT], None] = ...) -> None: ...
|
||||
@@ -19,5 +19,5 @@ class TTLCache(Cache[_KT, _VT]):
|
||||
@property
|
||||
def timer(self) -> Callable[[], float]: ...
|
||||
@property
|
||||
def ttl(self) -> int: ...
|
||||
def ttl(self) -> float: ...
|
||||
def expire(self, time: Optional[Callable[[], float]] = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user