mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-09 14:55:50 +08:00
cachetools: fix caching decorators return type (#4556)
This commit is contained in:
1 parent
c41f3e9bf9
commit
f1929d9e5a
1 file changed
+8
-5
+8
-5
@@ -1,8 +1,11 @@
|
||||
from typing import Callable, Optional, Sequence, TypeVar
|
||||
from typing import Any, Callable, Optional, Sequence, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
def lfu_cache(maxsize: int = ..., typed: bool = ...) -> None: ...
|
||||
def lru_cache(maxsize: int = ..., typed: bool = ...) -> None: ...
|
||||
def rr_cache(maxsize: int = ..., choice: Optional[Callable[[Sequence[_T]], _T]] = ..., typed: bool = ...) -> None: ...
|
||||
def ttl_cache(maxsize: int = ..., ttl: int = ..., timer: float = ..., typed: bool = ...) -> None: ...
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
_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: ...
|
||||
Reference in new issue
Block a user