Skip to content

Commit 0344970

Browse files
committed
Update _TimedCache.
1 parent 92a1ae0 commit 0344970

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stubs/cachetools/cachetools/__init__.pyi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ class RRCache(Cache[_KT, _VT]):
5050
def choice(self) -> Callable[[Sequence[_KT]], _KT]: ...
5151

5252
class _TimedCache(Cache[_KT, _VT]):
53-
def __init__(self, maxsize: float, timer: Callable[..., _TT], getsizeof: Callable[[_VT], float] | None): ...
53+
@overload
54+
def __init__(self, maxsize: float, timer: Callable[[], _TT] = ..., getsizeof: None = None): ...
55+
@overload
56+
def __init__(self, maxsize: float, timer: Callable[[], _TT], getsizeof: Callable[[_VT], float]): ...
57+
@overload
58+
def __init__(self, maxsize: float, timer: Callable[[], _TT] = ..., *, getsizeof: Callable[[_VT], float]): ...
5459

5560
class _Timer:
5661
def __init__(self, timer: Callable[[], _TT]) -> None: ...

0 commit comments

Comments
 (0)