Fix functools.lru_cache() type hint to allow maxsize=None (#627)

This commit is contained in:
Kai Lautaportti
2016-10-22 15:45:57 -07:00
committed by Guido van Rossum
parent 7224b67532
commit f6bbc46c35

View File

@@ -28,7 +28,7 @@ class _lru_cache_wrapper(Generic[_T]):
def cache_info(self) -> CacheInfo: ...
class lru_cache():
def __init__(self, maxsize: int = ..., typed: bool = ...) -> None:
def __init__(self, maxsize: Optional[int] = ..., typed: bool = ...) -> None:
pass
def __call__(self, f: Callable[..., _T]) -> _lru_cache_wrapper[_T]: ...