Fix incorrect type hint for cachetools TTLCache.expire (#5186)

`TTLCache.expire` expects a time value, not a timer function
This commit is contained in:
Christopher Sang
2021-04-05 14:09:08 -04:00
committed by GitHub
parent 5a3b6c72a7
commit 390d8f4911

View File

@@ -20,4 +20,4 @@ class TTLCache(Cache[_KT, _VT]):
def timer(self) -> Callable[[], float]: ...
@property
def ttl(self) -> float: ...
def expire(self, time: Optional[Callable[[], float]] = ...) -> None: ...
def expire(self, time: Optional[float] = ...) -> None: ...