8000 lru_cache: Adds #type: ignore to usages os ParamSpec to fix mypy errors · python/typeshed@130c84b · GitHub
[go: up one dir, main page]

Skip to content

Commit 130c84b

Browse files
committed
lru_cache: Adds #type: ignore to usages os ParamSpec to fix mypy errors
1 parent e642aa8 commit 130c84b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

stdlib/functools.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ class _CacheInfo(NamedTuple):
2424
maxsize: int
2525
currsize: int
2626

27-
class _lru_cache_wrapper(Generic[_P, _T]):
28-
__wrapped__: Callable[_P, _T]
29-
def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _T: ...
27+
class _lru_cache_wrapper(Generic[_P, _T]): # type: ignore
28+
__wrapped__: Callable[_P, _T] # type: ignore
29+
def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _T: ... # type: ignore
3030
def cache_info(self) -> _CacheInfo: ...
3131
def cache_clear(self) -> None: ...
3232

3333
if sys.version_info >= (3, 8):
3434
@overload
35-
def lru_cache(maxsize: int | None = ..., typed: bool = ...) -> Callable[[Callable[_P, _T]], _lru_cache_wrapper[_P, _T]]: ...
35+
def lru_cache(maxsize: int | None = ..., typed: bool = ...) -> Callable[[Callable[_P, _T]], _lru_cache_wrapper[_P, _T]]: ... # type: ignore
3636
@overload
37-
def lru_cache(maxsize: Callable[_P, _T], typed: bool = ...) -> _lru_cache_wrapper[_P, _T]: ...
37+
def lru_cache(maxsize: Callable[_P, _T], typed: bool = ...) -> _lru_cache_wrapper[_P, _T]: ... # type: ignore
3838

3939
else:
40-
def lru_cache(maxsize: int | None = ..., typed: bool = ...) -> Callable[[Callable[_P, _T]], _lru_cache_wrapper[_P, _T]]: ...
40+
def lru_cache(maxsize: int | None = ..., typed: bool = ...) -> Callable[[Callable[_P, _T]], _lru_cache_wrapper[_P, _T]]: ... # type: ignore
4141

4242
WRAPPER_ASSIGNMENTS: Sequence[str]
4343
WRAPPER_UPDATES: Sequence[str]
@@ -117,7 +117,7 @@ if sys.version_info >= (3, 8):
117117
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
118118

119119
if sys.version_info >= (3, 9):
120-
def cache(__user_function: Callable[_P, _T]) -> _lru_cache_wrapper[_P, _T]: ...
120+
def cache(__user_function: Callable[_P, _T]) -> _lru_cache_wrapper[_P, _T]: ... # type: ignore
121121

122122
def _make_key(
123123
args: Tuple[Hashable, ...],

0 commit comments

Comments
 (0)
0