Skip to content

Commit eff53f4

Browse files
committed
update mypy
SEE: python/mypy#18278 The added Any doesn't change the behaviour of mypy, it was Any before as well.
1 parent 8c52d26 commit eff53f4

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ coverage==7.*
1212
# typechecking
1313
# pyre-check==0.9.*
1414
# pyright==1.*
15-
mypy==1.14.*
15+
mypy==1.15.*
1616
typing-extensions==4.*
1717
pytype==2024.10.11
1818

typed_stream/_impl/_utils.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Generic,
1313
Literal,
1414
NoReturn,
15+
ParamSpec,
1516
TypeGuard,
1617
TypeVar,
1718
final,
@@ -117,8 +118,11 @@ def __call__(self, value: object | None) -> bool:
117118
return value is not None
118119

119120

120-
def count_required_positional_arguments( # type: ignore[misc]
121-
fun: Callable[..., object], / # noqa: W504
121+
_P = ParamSpec("_P")
122+
123+
124+
def count_required_positional_arguments(
125+
fun: Callable[_P, object], / # noqa: W504
122126
) -> int:
123127
"""Count the required positional arguments."""
124128
return len(

typed_stream/_impl/functions.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from __future__ import annotations
88

99
import operator
10+
import typing
1011
from collections.abc import Callable, Sequence
1112
from numbers import Number, Real
1213
from typing import Concatenate, Generic, Literal, ParamSpec, TypeVar
@@ -129,8 +130,10 @@ class method_partial(Generic[TArg, TRet, PApplied]): # noqa: N801,D301
129130
"""
130131

131132
_fun: Callable[Concatenate[TArg, PApplied], TRet]
132-
_args: PApplied.args
133-
_kwargs: PApplied.kwargs
133+
# PApplied.args
134+
_args: typing.Any # type: ignore[explicit-any]
135+
# PApplied.kwargs
136+
_kwargs: typing.Any # type: ignore[explicit-any]
134137

135138
__slots__ = ("_fun", "_args", "_kwargs")
136139

0 commit comments

Comments
 (0)