From 7764a4f4d51ea62bbfeac5784b5d67a12fe9eb9c Mon Sep 17 00:00:00 2001 From: Taj Date: Wed, 12 Jan 2022 19:58:39 +0000 Subject: [PATCH] Fix cachetools maxsize argument types (#6901) --- stubs/cachetools/cachetools/func.pyi | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/stubs/cachetools/cachetools/func.pyi b/stubs/cachetools/cachetools/func.pyi index d081d5166..8135f8d14 100644 --- a/stubs/cachetools/cachetools/func.pyi +++ b/stubs/cachetools/cachetools/func.pyi @@ -3,11 +3,13 @@ from typing import Callable, Sequence, TypeVar _T = TypeVar("_T") -def fifo_cache(maxsize: float = ..., typed: bool = ...) -> IdentityFunction: ... -def lfu_cache(maxsize: float = ..., typed: bool = ...) -> IdentityFunction: ... -def lru_cache(maxsize: float = ..., typed: bool = ...) -> IdentityFunction: ... -def mru_cache(maxsize: float = ..., typed: bool = ...) -> IdentityFunction: ... -def rr_cache(maxsize: float = ..., choice: Callable[[Sequence[_T]], _T] | None = ..., typed: bool = ...) -> IdentityFunction: ... -def ttl_cache( - maxsize: float = ..., ttl: float = ..., timer: Callable[[], float] = ..., typed: bool = ... +def fifo_cache(maxsize: float | None = ..., typed: bool = ...) -> IdentityFunction: ... +def lfu_cache(maxsize: float | None = ..., typed: bool = ...) -> IdentityFunction: ... +def lru_cache(maxsize: float | None = ..., typed: bool = ...) -> IdentityFunction: ... +def mru_cache(maxsize: float | None = ..., typed: bool = ...) -> IdentityFunction: ... +def rr_cache( + maxsize: float | None = ..., choice: Callable[[Sequence[_T]], _T] | None = ..., typed: bool = ... +) -> IdentityFunction: ... +def ttl_cache( + maxsize: float | None = ..., ttl: float = ..., timer: Callable[[], float] = ..., typed: bool = ... ) -> IdentityFunction: ...