mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Reject ParamSpec-typed callables calls with insufficient arguments

Open sterliakov opened this issue 1 year ago • 16 comments

Fixes #14571.

When type checking a call of a ParamSpec-typed callable, currently there is an incorrect "fast path" (if there are two arguments of shape (*args: P.args, **kwargs: P.kwargs), accept), which breaks with Concatenate (such call was accepted even for Concatenate[int, P]).

Also there was no checking that args and kwargs are actually present: since *args and **kwargs are not required, their absence was silently accepted.

sterliakov avatar Jun 04 '24 01:06 sterliakov

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/nanops.py:799: error: No overload variant of "apply_along_axis" matches argument types "Callable[[Any, Any], Any]", "int", "Any"  [call-overload]
+ pandas/core/nanops.py:799: note: Possible overload variants:
+ pandas/core/nanops.py:799: note:     def [_P`-1, _SCT <: generic] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[_SCT]] | _NestedSequence[_SupportsArray[dtype[_SCT]]]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[_SCT]]
+ pandas/core/nanops.py:799: note:     def [_P`-1] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[Any]]
+ pandas/core/missing.py:422: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/core/missing.py:422: error: No overload variant of "apply_along_axis" matches argument types "Callable[[ndarray[Any, Any]], None]", "int", "ndarray[Any, Any]"  [call-overload]
+ pandas/core/missing.py:422: note: Error code "call-overload" not covered by "type: ignore" comment
+ pandas/core/missing.py:422: note: Possible overload variants:
+ pandas/core/missing.py:422: note:     def [_P`-1, _SCT <: generic] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[_SCT]] | _NestedSequence[_SupportsArray[dtype[_SCT]]]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[_SCT]]
+ pandas/core/missing.py:422: note:     def [_P`-1] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[Any]]

starlette (https://github.com/encode/starlette)
+ starlette/concurrency.py:41: error: Too few arguments  [call-arg]

optuna (https://github.com/optuna/optuna)
+ optuna/_convert_positional_args.py:83: error: Too few arguments  [call-arg]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_series.py:3057: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3057: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3057: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3057: note: Possible overload variants:
+ tests/test_series.py:3057: note:     def [P`33483, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3057: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3061: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3064: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3064: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3064: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3064: note: Possible overload variants:
+ tests/test_series.py:3064: note:     def [P`33491, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3064: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3068: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:164: error: Expression is of type "Any", not "DataFrame"  [assert-type]
+ tests/test_resampler.py:164: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[DatetimeIndexResampler[DataFrame]], DataFrame]"  [call-overload]
+ tests/test_resampler.py:164: note: Possible overload variants:
+ tests/test_resampler.py:164: note:     def [P`35729, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:164: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:170: error: Expression is of type "Any", not "DataFrame"  [assert-type]
+ tests/test_resampler.py:170: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[DatetimeIndexResampler[DataFrame]], DataFrame]"  [call-overload]
+ tests/test_resampler.py:170: note: Possible overload variants:
+ tests/test_resampler.py:170: note:     def [P`35744, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:170: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:176: error: Expression is of type "Any", not "Series[Any]"  [assert-type]
+ tests/test_resampler.py:176: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[DatetimeIndexResampler[DataFrame]], Series[Any]]"  [call-overload]
+ tests/test_resampler.py:176: note: Possible overload variants:
+ tests/test_resampler.py:176: note:     def [P`35759, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:176: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:182: error: Expression is of type "Any", not "float"  [assert-type]
+ tests/test_resampler.py:182: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[DatetimeIndexResampler[DataFrame]], float]"  [call-overload]
+ tests/test_resampler.py:182: note: Possible overload variants:
+ tests/test_resampler.py:182: note:     def [P`35774, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:182: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:237: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:237: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:237: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:237: note: Possible overload variants:
+ tests/test_resampler.py:237: note:     def [P`35892, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:237: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:241: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:244: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:244: note: Possible overload variants:
+ tests/test_resampler.py:244: note:     def [P`35902, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:244: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:248: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:378: error: Expression is of type "Any", not "Series[Any]"  [assert-type]
+ tests/test_resampler.py:378: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[DatetimeIndexResampler[Series[Any]]], Series[Any]]"  [call-overload]
+ tests/test_resampler.py:378: note: Possible overload variants:
+ tests/test_resampler.py:378: note:     def [P`36157, T] pipe(self, func: Callable[[DatetimeIndexResampler[Series[Any]], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:378: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:384: error: Expression is of type "Any", not "float"  [assert-type]
+ tests/test_resampler.py:384: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[DatetimeIndexResampler[Series[Any]]], float]"  [call-overload]
+ tests/test_resampler.py:384: note: Possible overload variants:
+ tests/test_resampler.py:384: note:     def [P`36172, T] pipe(self, func: Callable[[DatetimeIndexResampler[Series[Any]], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:384: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:390: error: Expression is of type "Any", not "DataFrame"  [assert-type]
+ tests/test_resampler.py:390: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[DatetimeIndexResampler[Series[Any]]], DataFrame]"  [call-overload]
+ tests/test_resampler.py:390: note: Possible overload variants:
+ tests/test_resampler.py:390: note:     def [P`36189, T] pipe(self, func: Callable[[DatetimeIndexResampler[Series[Any]], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:390: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_groupby.py:293: error: Expression is of type "Any", not "DataFrame"  [assert-type]
+ tests/test_groupby.py:293: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[Resampler[DataFrame]], DataFrame]"  [call-overload]
+ tests/test_groupby.py:293: note: Possible overload variants:
+ tests/test_groupby.py:293: note:     def [P`42298, T] pipe(self, func: Callable[[DatetimeIndexResamplerGroupby[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_groupby.py:293: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_groupby.py:293: note:     def [P`42303, T] pipe(self, func: Callable[[PeriodIndexResamplerGroupby[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_groupby.py:293: note:     def [P`42308, T] pipe(self, func: Callable[[TimedeltaIndexResamplerGroupby[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_groupby.py:299: error: Expression is of type "Any", not "Series[Any]"  [assert-type]
+ tests/test_groupby.py:299: error: No overload variant of "pipe" of "BaseGroupBy" matches argument type "Callable[[Resampler[DataFrame]], Series[Any]]"  [call-overload]
+ tests/test_groupby.py:299: note: Possible overload variants:
+ tests/test_groupby.py:299: note:     def [P`42353, T] pipe(self, func: Callable[[DatetimeIndexResamplerGroupby[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_groupby.py:299: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_groupby.py:299: note:     def [P`42358, T] pipe(self, func: Callable[[PeriodIndexResamplerGroupby[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T

... (truncated 39 lines) ...

trio (https://github.com/python-trio/trio)
+ src/trio/_core/_thread_cache.py:163: error: No overload variant of "capture" matches argument type "Callable[[], RetT]"  [call-overload]
+ src/trio/_core/_thread_cache.py:163: note: Possible overload variants:
+ src/trio/_core/_thread_cache.py:163: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_core/_thread_cache.py:163: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_core/_run.py:1116: error: No overload variant of "capture" matches argument type "Callable[[], Never]"  [call-overload]
+ src/trio/_core/_run.py:1116: note: Possible overload variants:
+ src/trio/_core/_run.py:1116: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_core/_run.py:1116: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_core/_run.py:1445: error: No overload variant of "capture" matches argument type "Callable[[], Never]"  [call-overload]
+ src/trio/_core/_run.py:1445: note: Possible overload variants:
+ src/trio/_core/_run.py:1445: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_core/_run.py:1445: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_core/_run.py:1559: error: No overload variant of "capture" matches argument types "Callable[[float], List[Tuple[int, int]]]", "int"  [call-overload]
+ src/trio/_core/_run.py:1559: note: Possible overload variants:
+ src/trio/_core/_run.py:1559: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_core/_run.py:1559: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_threads.py:171: error: No overload variant of "acapture" matches argument type "Callable[[], Coroutine[Any, Any, RetT]]"  [call-overload]
+ src/trio/_threads.py:171: note: Possible overload variants:
+ src/trio/_threads.py:171: note:     def [ArgsT`-1] acapture(async_fn: Callable[ArgsT, Awaitable[Never]], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Coroutine[Any, Any, Error]
+ src/trio/_threads.py:171: note:     def [ArgsT`-1, ResultT] acapture(async_fn: Callable[ArgsT, Awaitable[ResultT]], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Coroutine[Any, Any, Union[Value[ResultT], Error]]
+ src/trio/_threads.py:177: error: No overload variant of "acapture" matches argument type "Callable[[], Coroutine[Any, Any, RetT]]"  [call-overload]
+ src/trio/_threads.py:177: note: Possible overload variants:
+ src/trio/_threads.py:177: note:     def [ArgsT`-1] acapture(async_fn: Callable[ArgsT, Awaitable[Never]], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Coroutine[Any, Any, Error]
+ src/trio/_threads.py:177: note:     def [ArgsT`-1, ResultT] acapture(async_fn: Callable[ArgsT, Awaitable[ResultT]], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Coroutine[Any, Any, Union[Value[ResultT], Error]]
+ src/trio/_threads.py:230: error: No overload variant of "capture" matches argument type "Callable[[], RetT]"  [call-overload]
+ src/trio/_threads.py:230: note: Possible overload variants:
+ src/trio/_threads.py:230: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_threads.py:230: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_threads.py:402: error: No overload variant of "capture" matches argument type "Callable[[], RetT]"  [call-overload]
+ src/trio/_threads.py:402: note: Possible overload variants:
+ src/trio/_threads.py:402: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_threads.py:402: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_core/_tests/test_ki.py:412: error: No overload variant of "capture" matches argument type "Callable[[], Never]"  [call-overload]
+ src/trio/_core/_tests/test_ki.py:412: note: Possible overload variants:
+ src/trio/_core/_tests/test_ki.py:412: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_core/_tests/test_ki.py:412: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_tests/test_timeouts.py:17: error: No overload variant of "acapture" matches argument type "Callable[[], Awaitable[T]]"  [call-overload]
+ src/trio/_tests/test_timeouts.py:17: note: Possible overload variants:
+ src/trio/_tests/test_timeouts.py:17: note:     def [ArgsT`-1] acapture(async_fn: Callable[ArgsT, Awaitable[Never]], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Coroutine[Any, Any, Error]
+ src/trio/_tests/test_timeouts.py:17: note:     def [ArgsT`-1, ResultT] acapture(async_fn: Callable[ArgsT, Awaitable[ResultT]], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Coroutine[Any, Any, Union[Value[ResultT], Error]]
+ src/trio/_tests/test_timeouts.py:41: error: Returning Any from function declared to return "T"  [no-any-return]
+ src/trio/_core/_tests/test_run.py:1469: error: No overload variant of "capture" matches argument type "Callable[[], Never]"  [call-overload]
+ src/trio/_core/_tests/test_run.py:1469: note: Possible overload variants:
+ src/trio/_core/_tests/test_run.py:1469: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_core/_tests/test_run.py:1469: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_core/_tests/test_run.py:1486: error: No overload variant of "capture" matches argument type "Callable[[], Never]"  [call-overload]
+ src/trio/_core/_tests/test_run.py:1486: note: Possible overload variants:
+ src/trio/_core/_tests/test_run.py:1486: note:     def [ArgsT`-1] capture(sync_fn: Callable[ArgsT, Never], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Error
+ src/trio/_core/_tests/test_run.py:1486: note:     def [ArgsT`-1, ResultT] capture(sync_fn: Callable[ArgsT, ResultT], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Union[Value[ResultT], Error]
+ src/trio/_core/_tests/test_run.py:2246: error: No overload variant of "acapture" matches argument types "Callable[[Outcome[Any]], Coroutine[Any, Any, Any]]", "Outcome[None]"  [call-overload]
+ src/trio/_core/_tests/test_run.py:2246: note: Possible overload variants:
+ src/trio/_core/_tests/test_run.py:2246: note:     def [ArgsT`-1] acapture(async_fn: Callable[ArgsT, Awaitable[Never]], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Coroutine[Any, Any, Error]
+ src/trio/_core/_tests/test_run.py:2246: note:     def [ArgsT`-1, ResultT] acapture(async_fn: Callable[ArgsT, Awaitable[ResultT]], *args: ArgsT.args, **kwargs: ArgsT.kwargs) -> Coroutine[Any, Any, Union[Value[ResultT], Error]]

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/events.py: note: In function "connect":
+ pwndbg/gdblib/events.py:124: error: Too few arguments  [call-arg]
+ pwndbg/gdblib/events.py: note: At top level:

scrapy (https://github.com/scrapy/scrapy)
+ scrapy/core/spidermw.py:303: error: No overload variant of "mustbe_deferred" matches argument types "Callable[[Callable[[Response | Any, Request, Spider], Any], Response, Request, Spider], Any]", "Callable[[Response | Any, Request, Spider], Any]", "Response", "Request", "Spider"  [call-overload]
+ scrapy/core/spidermw.py:303: note: Possible overload variants:
+ scrapy/core/spidermw.py:303: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, Any], *args: _P.args, **kw: _P.kwargs) -> Any
+ scrapy/core/spidermw.py:303: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, Coroutine[Any, Any, _T]], *args: _P.args, **kw: _P.kwargs) -> Any
+ scrapy/core/spidermw.py:303: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, _T], *args: _P.args, **kw: _P.kwargs) -> Any
+ scrapy/core/downloader/middleware.py:101: error: No overload variant of "mustbe_deferred" matches argument types "Any", "Request"  [call-overload]
+ scrapy/core/downloader/middleware.py:101: note: Possible overload variants:
+ scrapy/core/downloader/middleware.py:101: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, Any], *args: _P.args, **kw: _P.kwargs) -> Any
+ scrapy/core/downloader/middleware.py:101: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, Coroutine[Any, Any, _T]], *args: _P.args, **kw: _P.kwargs) -> Any
+ scrapy/core/downloader/middleware.py:101: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, _T], *args: _P.args, **kw: _P.kwargs) -> Any
+ scrapy/core/downloader/__init__.py:215: error: No overload variant of "mustbe_deferred" matches argument types "Callable[[Request, Spider], Any]", "Request", "Spider"  [call-overload]
+ scrapy/core/downloader/__init__.py:215: note: Possible overload variants:
+ scrapy/core/downloader/__init__.py:215: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, Any], *args: _P.args, **kw: _P.kwargs) -> Any
+ scrapy/core/downloader/__init__.py:215: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, Coroutine[Any, Any, _T]], *args: _P.args, **kw: _P.kwargs) -> Any
+ scrapy/core/downloader/__init__.py:215: note:     def [_P`-1, _T] mustbe_deferred(f: Callable[_P, _T], *args: _P.args, **kw: _P.kwargs) -> Any

github-actions[bot] avatar Jun 04 '24 01:06 github-actions[bot]

Is the terrific Windows failure at test teardown really caused by my changes?..

sterliakov avatar Jun 04 '24 01:06 sterliakov

Is the terrific Windows failure at test teardown really caused by my changes?..

Probably not, I think I've seen that one before.

Separately, thanks for the PR! It would be good if you could go through the new errors in mypy-primer to check whether they are correct or false positives.

JelleZijlstra avatar Jun 04 '24 01:06 JelleZijlstra

There is one severe false positive, caused by overload. I have a test case for it now and will try to resolve this problem tomorrow, then go through the rest. New errors in trio and scrapy are caused by that.

[case testRunParamSpecOverload]
from typing_extensions import ParamSpec, Concatenate
from typing import Callable, overload, NoReturn, TypeVar, Union

P = ParamSpec("P")
T = TypeVar("T")

@overload
def capture(
    sync_fn: Callable[P, NoReturn],
    *args: P.args,
    **kwargs: P.kwargs,
) -> int: ...
@overload
def capture(
    sync_fn: Callable[P, T],
    *args: P.args,
    **kwargs: P.kwargs,
) -> Union[T, int]: ...
def capture(
    sync_fn: Callable[P, T],
    *args: P.args,
    **kwargs: P.kwargs,
) -> Union[T, int]:
    return sync_fn(*args, **kwargs)

def fn() -> int: return 1
capture(fn)

[builtins fixtures/paramspec.pyi]

sterliakov avatar Jun 04 '24 02:06 sterliakov

Diff from mypy_primer, showing the effect of this PR on open source code:

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/libclinic/codegen.py:301: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "Include"  [type-var]

python-chess (https://github.com/niklasf/python-chess)
+ chess/polyglot.py:450: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Iterator[Entry]"  [type-var]
+ chess/gaviota.py:1844: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "dict[tuple[str, int, int], TableBlock]"  [type-var]

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/tabs.py:120: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]
+ porcupine/pluginmanager.py:127: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "PluginInfo"  [type-var]
+ porcupine/plugins/jump_to_definition.py:88: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "LocationRange"  [type-var]

pip (https://github.com/pypa/pip)
+ src/pip/_internal/models/wheel.py:84: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "Generator[int, None, None]"  [type-var]
+ src/pip/_internal/utils/misc.py:294: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "map[int]"  [type-var]
+ src/pip/_internal/vcs/versioncontrol.py:232: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "dict[str, VersionControl]"  [type-var]
+ src/pip/_internal/req/req_set.py:22: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "InstallRequirement"  [type-var]
+ src/pip/_internal/req/req_set.py:29: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "InstallRequirement"  [type-var]
+ src/pip/_internal/index/package_finder.py:479: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "InstallationCandidate"  [type-var]
+ src/pip/_internal/index/package_finder.py:560: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "InstallationCandidate"  [type-var]
- src/pip/_internal/network/download.py:110: error: Argument 1 to "splitext" has incompatible type "Any | None"; expected "PathLike[Any]"  [arg-type]
+ src/pip/_internal/operations/freeze.py:142: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "FrozenRequirement"  [type-var]
+ src/pip/_internal/network/download.py:110: error: Value of type variable "AnyOrLiteralStr" of "splitext" cannot be "Any | None"  [type-var]
+ src/pip/_internal/commands/list.py:278: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "_DistWithLatestInfo"  [type-var]
+ src/pip/_internal/resolution/resolvelib/provider.py:170: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "Generator[float, None, None]"  [type-var]
+ src/pip/_internal/resolution/resolvelib/resolver.py:111: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "Candidate"  [type-var]

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/tools/console/common.py:64: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]
+ mitmproxy/contentviews/base.py:83: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]
+ mitmproxy/contentviews/auto.py:11: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[tuple[float, View], None, None]"  [type-var]
+ mitmproxy/tools/console/overlay.py:105: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]
+ mitmproxy/tools/console/options.py:97: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]
+ mitmproxy/tools/console/options.py:104: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]

check-jsonschema (https://github.com/python-jsonschema/check-jsonschema)
+ src/check_jsonschema/reporter.py:229: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Iterator[ValidationError]"  [type-var]
+ src/check_jsonschema/reporter.py:229: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "ValidationError"  [type-var]

comtypes (https://github.com/enthought/comtypes)
+ comtypes/test/test_findgendir.py:47: error: Value of type variable "_TT" of "__call__" of "_patch" cannot be "Callable[[Test], Any]"  [type-var]
+ comtypes/test/test_findgendir.py:60: error: Value of type variable "_TT" of "__call__" of "_patch" cannot be "Callable[[Test], Any]"  [type-var]
+ comtypes/test/test_findgendir.py:71: error: Value of type variable "_TT" of "__call__" of "_patch" cannot be "Callable[[Test], Any]"  [type-var]
+ comtypes/test/test_clear_cache.py:15: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[ClearCacheTestCase, Any], Any]"  [type-var]
+ comtypes/test/test_clear_cache.py:15: error: Value of type variable "_TT" of "__call__" of "_patch" cannot be "Callable[..., Any]"  [type-var]
+ comtypes/test/test_outparam.py:56: error: Value of type variable "_TT" of "__call__" of "_patch" cannot be "Callable[[Test], Any]"  [type-var]

pylint (https://github.com/pycqa/pylint)
+ pylint/pyreverse/diagrams.py:96: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "Relationship"  [type-var]
+ pylint/pyreverse/writer.py:61: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "PackageEntity"  [type-var]
+ pylint/message/message_definition_store.py:112: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "MessageDefinition"  [type-var]
+ pylint/config/config_file_parser.py:104: error: Value of type variable "AnyStr" of "expandvars" cannot be "Path"  [type-var]
+ pylint/config/arguments_manager.py:244: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "_ArgumentGroup"  [type-var]
+ pylint/config/arguments_manager.py:259: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "Action"  [type-var]
+ pylint/config/arguments_manager.py:312: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "_ArgumentGroup"  [type-var]
+ pylint/config/arguments_manager.py:330: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "Action"  [type-var]
+ pylint/checkers/similar.py:509: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "LinesChunk"  [type-var]
+ pylint/checkers/similar.py:517: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "LinesChunk"  [type-var]
+ pylint/checkers/base/name_checker/checker.py:349: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "Generator[Any, None, None]"  [type-var]

psycopg (https://github.com/psycopg/psycopg)
+ tests/test_tpc_async.py:6: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_tpc.py:9: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_generators.py:48: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_generators.py:48: error: "str" not callable  [operator]
+ tests/test_generators.py:147: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_cursor_server.py:11: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_cursor_server.py:41: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_cursor_server.py:41: error: "str" not callable  [operator]
+ tests/test_cursor_server.py:358: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_cursor_server.py:358: error: "str" not callable  [operator]
+ tests/test_cursor_server.py:444: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_cursor_server.py:444: error: "str" not callable  [operator]
+ tests/test_cursor_server.py:462: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_cursor_server.py:462: error: "str" not callable  [operator]
+ tests/test_cursor_server.py:496: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_cursor_server.py:496: error: "str" not callable  [operator]
+ tests/test_concurrency_async.py:69: error: "str" not callable  [operator]
+ tests/test_concurrency_async.py:70: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency_async.py:94: error: "str" not callable  [operator]
+ tests/test_concurrency_async.py:95: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency_async.py:120: error: "str" not callable  [operator]
+ tests/test_concurrency_async.py:122: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency_async.py:147: error: "str" not callable  [operator]
+ tests/test_concurrency_async.py:153: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency_async.py:202: error: "str" not callable  [operator]
+ tests/test_concurrency_async.py:207: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency_async.py:321: error: "str" not callable  [operator]
+ tests/test_concurrency_async.py:322: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency.py:111: error: "str" not callable  [operator]
+ tests/test_concurrency.py:113: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency.py:165: error: "str" not callable  [operator]
+ tests/test_concurrency.py:166: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency.py:189: error: "str" not callable  [operator]
+ tests/test_concurrency.py:190: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency.py:214: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency.py:214: error: "str" not callable  [operator]
+ tests/test_concurrency.py:240: error: "str" not callable  [operator]
+ tests/test_concurrency.py:246: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency.py:298: error: "str" not callable  [operator]
+ tests/test_concurrency.py:303: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_concurrency.py:440: error: "str" not callable  [operator]
+ tests/test_concurrency.py:441: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_capabilities.py:26: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_capabilities.py:26: error: Argument "marks" to "param" has incompatible type "str"; expected "MarkDecorator | Collection[MarkDecorator | Mark]"  [arg-type]
+ tests/test_capabilities.py:26: note: Following member(s) of "str" have conflicts:
+ tests/test_capabilities.py:26: note:     Expected:
+ tests/test_capabilities.py:26: note:         def __contains__(self, object, /) -> bool
+ tests/test_capabilities.py:26: note:     Got:
+ tests/test_capabilities.py:26: note:         def __contains__(self, str, /) -> bool
+ tests/test_capabilities.py:26: note:     Expected:
+ tests/test_capabilities.py:26: note:         def __iter__(self) -> Iterator[MarkDecorator | Mark]
+ tests/test_capabilities.py:26: note:     Got:
+ tests/test_capabilities.py:26: note:         def __iter__(self) -> Iterator[str]
+ tests/test_capabilities.py:39: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/test_capabilities.py:39: error: Argument "marks" to "param" has incompatible type "str"; expected "MarkDecorator | Collection[MarkDecorator | Mark]"  [arg-type]
+ tests/test_capabilities.py:39: note: Following member(s) of "str" have conflicts:
+ tests/test_capabilities.py:39: note:     Expected:
+ tests/test_capabilities.py:39: note:         def __contains__(self, object, /) -> bool
+ tests/test_capabilities.py:39: note:     Got:
+ tests/test_capabilities.py:39: note:         def __contains__(self, str, /) -> bool
+ tests/test_capabilities.py:39: note:     Expected:
+ tests/test_capabilities.py:39: note:         def __iter__(self) -> Iterator[MarkDecorator | Mark]
+ tests/test_capabilities.py:39: note:     Got:
+ tests/test_capabilities.py:39: note:         def __iter__(self) -> Iterator[str]
+ tests/fix_faker.py:72: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "type"  [type-var]
+ tests/_test_transaction.py:7: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/_test_connection.py:66: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/_test_connection.py:66: error: Argument "marks" to "param" has incompatible type "str"; expected "MarkDecorator | Collection[MarkDecorator | Mark]"  [arg-type]
+ tests/_test_connection.py:66: note: Following member(s) of "str" have conflicts:
+ tests/_test_connection.py:66: note:     Expected:
+ tests/_test_connection.py:66: note:         def __contains__(self, object, /) -> bool
+ tests/_test_connection.py:66: note:     Got:
+ tests/_test_connection.py:66: note:         def __contains__(self, str, /) -> bool
+ tests/_test_connection.py:66: note:     Expected:
+ tests/_test_connection.py:66: note:         def __iter__(self) -> Iterator[MarkDecorator | Mark]
+ tests/_test_connection.py:66: note:     Got:
+ tests/_test_connection.py:66: note:         def __iter__(self) -> Iterator[str]
+ tests/_test_connection.py:72: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/_test_connection.py:75: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/_test_connection.py:75: error: Argument "marks" to "param" has incompatible type "str"; expected "MarkDecorator | Collection[MarkDecorator | Mark]"  [arg-type]
+ tests/_test_connection.py:75: note: Following member(s) of "str" have conflicts:
+ tests/_test_connection.py:75: note:     Expected:
+ tests/_test_connection.py:75: note:         def __contains__(self, object, /) -> bool
+ tests/_test_connection.py:75: note:     Got:
+ tests/_test_connection.py:75: note:         def __contains__(self, str, /) -> bool
+ tests/_test_connection.py:75: note:     Expected:
+ tests/_test_connection.py:75: note:         def __iter__(self) -> Iterator[MarkDecorator | Mark]
+ tests/_test_connection.py:75: note:     Got:
+ tests/_test_connection.py:75: note:         def __iter__(self) -> Iterator[str]
+ tests/_test_connection.py:75: note:     Expected:
+ tests/_test_connection.py:75: note:         def __contains__(self, object, /) -> bool
+ tests/_test_connection.py:75: note:     Got:
+ tests/_test_connection.py:75: note:         def __contains__(self, str, /) -> bool
+ tests/_test_connection.py:75: note:     Expected:
+ tests/_test_connection.py:75: note:         def __iter__(self) -> Iterator[MarkDecorator | Mark]
+ tests/_test_connection.py:75: note:     Got:
+ tests/_test_connection.py:75: note:         def __iter__(self) -> Iterator[str]
+ tests/_test_connection.py:78: error: Value of type variable "Markable" of "__call__" of "MarkDecorator" cannot be "str"  [type-var]
+ tests/_test_connection.py:78: error: Argument "marks" to "param" has incompatible type "str"; expected "MarkDecorator | Collection[MarkDecorator | Mark]"  [arg-type]
+ tests/_test_connection.py:78: note: Following member(s) of "str" have conflicts:
+ tests/_test_connection.py:78: note:     Expected:
+ tests/_test_connection.py:78: note:         def __contains__(self, object, /) -> bool
+ tests/_test_connection.py:78: note:     Got:
+ tests/_test_connection.py:78: note:         def __contains__(self, str, /) -> bool
+ tests/_test_connection.py:78: note:     Expected:

... (truncated 522 lines) ...

jinja (https://github.com/pallets/jinja)
+ src/jinja2/loaders.py:620: error: Value of type variable "_C" of "proxy" cannot be "_TemplateModule"  [type-var]
+ src/jinja2/loaders.py:620: error: Incompatible types in assignment (expression has type "CallableProxyType[_TemplateModule]", target has type Module)  [assignment]
+ src/jinja2/filters.py:437: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "V"  [type-var]
+ src/jinja2/filters.py:1261: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "V"  [type-var]
+ src/jinja2/filters.py:1288: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "V"  [type-var]
+ src/jinja2/filters.py:1323: error: Unused "type: ignore[call-overload, no-any-return]" comment  [unused-ignore]
+ src/jinja2/filters.py:1323: error: Value of type variable "_SupportsSumNoDefaultT" of "sum" cannot be "V"  [type-var]
+ src/jinja2/filters.py:1323: note: Error code "type-var" not covered by "type: ignore" comment
+ src/jinja2/filters.py:1323: error: Value of type variable "_AddableT1" of "sum" cannot be "V"  [type-var]
+ src/jinja2/filters.py:1323: error: Value of type variable "_AddableT2" of "sum" cannot be "V"  [type-var]
+ src/jinja2/environment.py:463: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "Extension"  [type-var]

schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/exceptions.py: note: In member "__init__" of class "SchemaSaladException":
+ schema_salad/exceptions.py:40:29: error: Value of type variable "_SupportsSumNoDefaultT" of "sum" cannot be "list[SchemaSaladException]"  [type-var]
+ schema_salad/exceptions.py:42:29: error: Value of type variable "_SupportsSumNoDefaultT" of "sum" cannot be "list[SchemaSaladException]"  [type-var]
+ schema_salad/exceptions.py: note: In member "leaves" of class "SchemaSaladException":
+ schema_salad/exceptions.py:78:20: error: Value of type variable "_SupportsSumNoDefaultT" of "sum" cannot be "list[SchemaSaladException]"  [type-var]
+ schema_salad/dlang_codegen.py: note: In member "to_doc_comment" of class "DlangCodeGen":
+ schema_salad/dlang_codegen.py:146:21: error: Value of type variable "_SupportsSumNoDefaultT" of "sum" cannot be "list[str]"  [type-var]
+ schema_salad/tests/test_errors.py:274:2: error: Value of type variable "Markable" of "__call__" of "_SkipMarkDecorator" cannot be "str"  [type-var]
+ schema_salad/tests/test_errors.py:274:2: error: "str" not callable  [operator]

steam.py (https://github.com/Gobot1234/steam.py)
+ steam/gateway.py:154: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "CMServer"  [type-var]
+ steam/chat.py:91: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "Role"  [type-var]
- steam/state.py:466: error: Argument 2 to "pop" of "dict" has incompatible type "None"; expected "Clan"  [arg-type]
+ steam/state.py:466: error: No overload variant of "pop" of "dict" matches argument types "ID32", "None"  [call-overload]
+ steam/state.py:466: note: Possible overload variants:
+ steam/state.py:466: note:     def pop(self, ID32, /) -> Clan
+ steam/state.py:466: note:     def pop(self, ID32, Clan, /) -> Clan
+ steam/state.py:466: note:     def [_T] pop(self, ID32, _T, /) -> Clan | _T
- steam/state.py:1458: error: Argument 2 to "pop" of "dict" has incompatible type "None"; expected "ClanInvite | GroupInvite"  [arg-type]
+ steam/state.py:1458: error: No overload variant of "pop" of "dict" matches argument types "ID32", "None"  [call-overload]
+ steam/state.py:1458: note: Possible overload variants:
+ steam/state.py:1458: note:     def pop(self, ID32, /) -> ClanInvite | GroupInvite
+ steam/state.py:1458: note:     def pop(self, ID32, ClanInvite | GroupInvite, /) -> ClanInvite | GroupInvite
+ steam/state.py:1458: note:     def [_T] pop(self, ID32, _T, /) -> ClanInvite | GroupInvite | _T
+ steam/state.py:2477: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "ContentServer"  [type-var]
- steam/ext/commands/commands.py:732: error: Unused "type: ignore" comment  [unused-ignore]
+ steam/ext/commands/commands.py:733: error: Incompatible return value type (got "Any | None", expected "C")  [return-value]
+ steam/ext/tf2/client.py:104: error: Value of type variable "GCMsgProtoT" of "gc_wait_for" of "SteamWebSocket" cannot be "CraftResponse"  [type-var]

sockeye (https://github.com/awslabs/sockeye)
+ sockeye/data_io.py:714: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[Any, None, None]"  [type-var]
+ sockeye/data_io.py:715: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[Any, None, None]"  [type-var]
+ sockeye/inference.py:57: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[float, None, None]"  [type-var]
+ sockeye/inference.py:58: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[float, None, None]"  [type-var]
+ sockeye/inference.py:59: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "Generator[int, None, None]"  [type-var]
+ sockeye/inference.py:60: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "Generator[int, None, None]"  [type-var]
+ sockeye/inference.py:934: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "IndexedTranslatorInput"  [type-var]
+ sockeye/inference.py:1020: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]
+ sockeye/inference.py:1021: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]
+ sockeye/inference.py:1022: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "Generator[int, None, None]"  [type-var]
+ sockeye/training.py:937: error: Value of type variable "_SupportsSumNoDefaultT" of "sum" cannot be "tuple[str, float]"  [type-var]

dragonchain (https://github.com/dragonchain/dragonchain)
+ dragonchain/lib/interfaces/aws/s3_utest.py:29:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:34:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:38:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:43:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:47:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:52:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:59:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:71:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:75:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:79:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:83:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:92:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:99:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:106:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:111:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:115:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:119:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:124:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/aws/s3_utest.py:128:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestS3Interface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:31:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:37:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:41:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:45:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:51:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:51:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[..., Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:57:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:62:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:62:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[..., Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:69:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:73:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:77:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:81:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/interfaces/local/disk_utest.py:86:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestDiskInterface, Any], Any]"  [type-var]
+ dragonchain/lib/dto/eth_utest.py:156:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestEthereumMethods, Any], Any]"  [type-var]
+ dragonchain/lib/dto/eth_utest.py:170:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestEthereumMethods, Any], Any]"  [type-var]
+ dragonchain/lib/dto/eth_utest.py:208:6: error: Value of type variable "_TT" of "__call__" of "_patch_default_new" cannot be "Callable[[TestEthereumMethods, Any], Any]"  [type-var]

... (truncated 1431 lines) ...```

github-actions[bot] avatar Jun 04 '24 03:06 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

starlette (https://github.com/encode/starlette)
+ starlette/concurrency.py:41: error: Too few arguments  [call-arg]

optuna (https://github.com/optuna/optuna)
+ optuna/_convert_positional_args.py:83: error: Too few arguments  [call-arg]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_series.py:3022: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "str", "list[float]", "str", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3022: note: Possible overload variants:
+ tests/test_series.py:3022: note:     def [P`33403, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3022: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3024: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3036: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3036: note: Possible overload variants:
+ tests/test_series.py:3036: note:     def [P`33428, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3036: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3040: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3050: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3050: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "str", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3050: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3050: note: Possible overload variants:
+ tests/test_series.py:3050: note:     def [P`33453, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3050: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3057: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3057: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3057: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3057: note: Possible overload variants:
+ tests/test_series.py:3057: note:     def [P`33464, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3057: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3061: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3064: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3064: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3064: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3064: note: Possible overload variants:
+ tests/test_series.py:3064: note:     def [P`33475, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3064: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3068: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:202: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "str", "list[float]", "str", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:202: note: Possible overload variants:
+ tests/test_resampler.py:202: note:     def [P`35807, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:202: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:204: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:216: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:216: note: Possible overload variants:
+ tests/test_resampler.py:216: note:     def [P`35836, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:216: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:220: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:230: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:230: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "str", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:230: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:230: note: Possible overload variants:
+ tests/test_resampler.py:230: note:     def [P`35865, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:230: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:237: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:237: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:237: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:237: note: Possible overload variants:
+ tests/test_resampler.py:237: note:     def [P`35878, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:237: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:241: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:244: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:244: note: Possible overload variants:
+ tests/test_resampler.py:244: note:     def [P`35891, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:244: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:248: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1611: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "str", "list[float]", "str", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1611: note: Possible overload variants:
+ tests/test_frame.py:1611: note:     def [P`47097, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1611: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1613: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1625: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1625: note: Possible overload variants:
+ tests/test_frame.py:1625: note:     def [P`47122, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1625: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1629: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1639: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1639: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "str", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1639: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1639: note: Possible overload variants:

... (truncated 16 lines) ...

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/events.py: note: In function "connect":
+ pwndbg/gdblib/events.py:124: error: Too few arguments  [call-arg]
+ pwndbg/gdblib/events.py: note: At top level:

github-actions[bot] avatar Jun 04 '24 04:06 github-actions[bot]

Hm, and this primer diff looks marginally better.

  • starlette: the only false positive bit here, as far as I understand. How critical is partial+ParamSpec support? It is fundamentally different from any other ParamSpec-typed calls, because early binding allows omission of *args and/or **kwargs ParamSpec parts, but only if they were provided to partial, plus *args cannot be provided twice while **kwargs can. I have just crafted a patch to support all variations of such binding, but it involves adding one new attribute to CallableType, and I'm not sure whether such change is worth the performance impact. I can submit that change as a separate follow-up PR if you agree that this case is not critical.
    from functools import partial
    from typing_extensions import ParamSpec
    from typing import Callable, TypeVar
    
    P = ParamSpec("P")
    T = TypeVar("T")
    
    def run(func: Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> T:
        func2 = partial(func, *args, **kwargs)
        return func2()
    
    def run2(func: Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> T:
        func2 = partial(func, *args)
        return func2(**kwargs)
    
  • optuna: I'd call this a true positive, because fn: Callable[P, T]; kwargs: Any, fn(**kwargs) is obviously unsafe and fails for a function with posonly arguments. In fact such case is validated before and ends with early TypeError, but I don't believe this can be explained to mypy.
  • pandas-stubs: all errors are the same, correspond to lines where there's already a type: ignore comment followed by wider pyright: ignore[reportArgumentType,reportCallIssue] comment. Now mypy is closer to correct behaviour IMO. In some cases good exact argument error became a less precise "no overload variant...", but it's a fair price for actually checking that no args are missing. I don't see how to overcome that (yet). Caused by excessive strictness of ExpressionChecker.erased_signature_similarity.
  • pwndbg: The error is true positive (!), this looks like a bug in their code: there is a func: Callable[P, T], which is then called as func(). I don't know what note: At top level: means.

sterliakov avatar Jun 04 '24 14:06 sterliakov

For the starlette error, I do know anyio.to_thread.run_sync() will ultimately just pass the args to the func, so altering the code to bind both via partial would behave identically and is probably more correct anyway.

TeamSpen210 avatar Jun 04 '24 23:06 TeamSpen210

Diff from mypy_primer, showing the effect of this PR on open source code:

starlette (https://github.com/encode/starlette)
+ starlette/concurrency.py:41: error: Too few arguments  [call-arg]

optuna (https://github.com/optuna/optuna)
+ optuna/_convert_positional_args.py:83: error: Too few arguments  [call-arg]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_series.py:3022: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "str", "list[float]", "str", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3022: note: Possible overload variants:
+ tests/test_series.py:3022: note:     def [P`33573, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3022: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3024: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3036: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3036: note: Possible overload variants:
+ tests/test_series.py:3036: note:     def [P`33598, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3036: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3040: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3050: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3050: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "str", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3050: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3050: note: Possible overload variants:
+ tests/test_series.py:3050: note:     def [P`33623, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3050: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3057: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3057: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3057: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3057: note: Possible overload variants:
+ tests/test_series.py:3057: note:     def [P`33634, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3057: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3061: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3064: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3064: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3064: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3064: note: Possible overload variants:
+ tests/test_series.py:3064: note:     def [P`33645, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3064: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3068: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:202: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "str", "list[float]", "str", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:202: note: Possible overload variants:
+ tests/test_resampler.py:202: note:     def [P`35977, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:202: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:204: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:216: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:216: note: Possible overload variants:
+ tests/test_resampler.py:216: note:     def [P`36006, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:216: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:220: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:230: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:230: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "str", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:230: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:230: note: Possible overload variants:
+ tests/test_resampler.py:230: note:     def [P`36035, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:230: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:237: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:237: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:237: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:237: note: Possible overload variants:
+ tests/test_resampler.py:237: note:     def [P`36048, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:237: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:241: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:244: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:244: note: Possible overload variants:
+ tests/test_resampler.py:244: note:     def [P`36061, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:244: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:248: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1611: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "str", "list[float]", "str", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1611: note: Possible overload variants:
+ tests/test_frame.py:1611: note:     def [P`47491, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1611: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1613: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1625: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1625: note: Possible overload variants:
+ tests/test_frame.py:1625: note:     def [P`47516, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1625: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1629: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1639: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1639: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "str", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1639: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1639: note: Possible overload variants:

... (truncated 16 lines) ...

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/events.py: note: In function "connect":
+ pwndbg/gdblib/events.py:124: error: Too few arguments  [call-arg]
+ pwndbg/gdblib/events.py: note: At top level:

github-actions[bot] avatar Jun 10 '24 00:06 github-actions[bot]

I have cleaned up code here a little bit, this should be now ready for review. #17355 is the follow-up patch I promised for functools.partial based on this (marked draft because it contains all code from this branch and I'd probably want them reviewed separately).

sterliakov avatar Jun 10 '24 01:06 sterliakov

Cc @JelleZijlstra in a hope for review here:) This PR is a prerequisite for #17355 which overlaps with @ilevkivskyi ongoing ParamSpec work. I'm also fine with abandoning this and doing everything there in single PR, please let me know what granularity looks better for you.

sterliakov avatar Jun 24 '24 13:06 sterliakov

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/missing.py:422: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/core/missing.py:422: error: No overload variant of "apply_along_axis" matches argument types "Callable[[ndarray[Any, Any]], None]", "int", "ndarray[Any, Any]"  [call-overload]
+ pandas/core/missing.py:422: note: Error code "call-overload" not covered by "type: ignore" comment
+ pandas/core/missing.py:422: note: Possible overload variants:
+ pandas/core/missing.py:422: note:     def [_P`-1, _SCT: generic] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[_SCT]] | _NestedSequence[_SupportsArray[dtype[_SCT]]]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[_SCT]]
+ pandas/core/missing.py:422: note:     def [_P`-1] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[Any]]

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/events.py: note: In function "connect":
+ pwndbg/gdblib/events.py:156: error: Too few arguments  [call-arg]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_resampler.py:237: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:237: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:237: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:237: note: Possible overload variants:
+ tests/test_resampler.py:237: note:     def [P`26548, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:237: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:241: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:244: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:244: note: Possible overload variants:
+ tests/test_resampler.py:244: note:     def [P`26562, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:244: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:248: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3087: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3087: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3087: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3087: note: Possible overload variants:
+ tests/test_series.py:3087: note:     def [P`43577, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3087: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3091: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3094: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3094: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3094: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3094: note: Possible overload variants:
+ tests/test_series.py:3094: note:     def [P`43589, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3094: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3098: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1696: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1696: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1696: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1696: note: Possible overload variants:
+ tests/test_frame.py:1696: note:     def [P`63928, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1696: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1700: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1703: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1703: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1703: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1703: note: Possible overload variants:
+ tests/test_frame.py:1703: note:     def [P`63940, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1703: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1707: error: Unused "type: ignore" comment  [unused-ignore]

core (https://github.com/home-assistant/core)
+ homeassistant/components/lamarzocco/coordinator.py:116: error: Too few arguments  [call-arg]

optuna (https://github.com/optuna/optuna)
+ optuna/_convert_positional_args.py:83: error: Too few arguments  [call-arg]

starlette (https://github.com/encode/starlette)
+ starlette/concurrency.py:41: error: Too few arguments  [call-arg]

github-actions[bot] avatar Aug 21 '24 13:08 github-actions[bot]

Diff review:

  • Starlette: false positive on a weird case (partial + overload), resolved in #17355
  • Optuna: true positive (fn(**Any) where fn(*args: P.args, **kwargs: P.kwargs))
  • Code (homeassistant): true positive (args not passed, plain fn())
  • pwndbg: true positive, but with spurious note added
  • pandas & pandas-stubs: slightly worse overload resolution (instead of saying "here's the closest one, but still a miss" now mypy says "not even close, please try again"). All errors were already there, only code and/or lineno changed.

sterliakov avatar Aug 21 '24 14:08 sterliakov

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/missing.py:422: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/core/missing.py:422: error: No overload variant of "apply_along_axis" matches argument types "Callable[[ndarray[Any, Any]], None]", "int", "ndarray[Any, Any]"  [call-overload]
+ pandas/core/missing.py:422: note: Error code "call-overload" not covered by "type: ignore" comment
+ pandas/core/missing.py:422: note: Possible overload variants:
+ pandas/core/missing.py:422: note:     def [_P`-1, _SCT: generic] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[_SCT]] | _NestedSequence[_SupportsArray[dtype[_SCT]]]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[_SCT]]
+ pandas/core/missing.py:422: note:     def [_P`-1] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[Any]]

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/events.py: note: In function "connect":
+ pwndbg/gdblib/events.py:156: error: Too few arguments  [call-arg]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_resampler.py:237: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:237: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:237: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:237: note: Possible overload variants:
+ tests/test_resampler.py:237: note:     def [P`26548, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:237: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:241: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:244: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:244: note: Possible overload variants:
+ tests/test_resampler.py:244: note:     def [P`26562, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:244: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:248: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3087: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3087: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3087: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3087: note: Possible overload variants:
+ tests/test_series.py:3087: note:     def [P`43577, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3087: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3091: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3094: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3094: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3094: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3094: note: Possible overload variants:
+ tests/test_series.py:3094: note:     def [P`43589, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3094: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3098: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1710: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1710: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1710: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1710: note: Possible overload variants:
+ tests/test_frame.py:1710: note:     def [P`64031, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1710: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1714: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1717: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1717: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1717: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1717: note: Possible overload variants:
+ tests/test_frame.py:1717: note:     def [P`64043, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1717: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1721: error: Unused "type: ignore" comment  [unused-ignore]

core (https://github.com/home-assistant/core)
+ homeassistant/components/lamarzocco/coordinator.py:116: error: Too few arguments  [call-arg]

starlette (https://github.com/encode/starlette)
+ starlette/concurrency.py:41: error: Too few arguments  [call-arg]

optuna (https://github.com/optuna/optuna)
+ optuna/_convert_positional_args.py:83: error: Too few arguments  [call-arg]

github-actions[bot] avatar Aug 21 '24 18:08 github-actions[bot]

Wow, it's the same problem as in the first workflow run for this PR. I hardly know anything about Windows, but still doesn't seem to be caused by the changes here.

sterliakov avatar Aug 21 '24 22:08 sterliakov

Wow, it's the same problem as in the first workflow run for this PR. I hardly know anything about Windows, but still doesn't seem to be caused by the changes here.

I also got it on a seperate PR. It's not caused by the changes here.

A5rocks avatar Aug 28 '24 23:08 A5rocks

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/missing.py:422: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/core/missing.py:422: error: No overload variant of "apply_along_axis" matches argument types "Callable[[ndarray[Any, Any]], None]", "int", "ndarray[Any, Any]"  [call-overload]
+ pandas/core/missing.py:422: note: Error code "call-overload" not covered by "type: ignore" comment
+ pandas/core/missing.py:422: note: Possible overload variants:
+ pandas/core/missing.py:422: note:     def [_P`-1, _SCT: generic] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[_SCT]] | _NestedSequence[_SupportsArray[dtype[_SCT]]]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[_SCT]]
+ pandas/core/missing.py:422: note:     def [_P`-1] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[Any]]

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/events.py: note: In function "connect":
+ pwndbg/gdblib/events.py:156: error: Too few arguments  [call-arg]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_resampler.py:237: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:237: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:237: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:237: note: Possible overload variants:
+ tests/test_resampler.py:237: note:     def [P`27152, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:237: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:241: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:244: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:244: note: Possible overload variants:
+ tests/test_resampler.py:244: note:     def [P`27166, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:244: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:248: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3097: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3097: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3097: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3097: note: Possible overload variants:
+ tests/test_series.py:3097: note:     def [P`44255, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3097: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3101: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3104: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3104: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3104: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3104: note: Possible overload variants:
+ tests/test_series.py:3104: note:     def [P`44267, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3104: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3108: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1745: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1745: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1745: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1745: note: Possible overload variants:
+ tests/test_frame.py:1745: note:     def [P`64744, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1745: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1749: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1752: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1752: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1752: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1752: note: Possible overload variants:
+ tests/test_frame.py:1752: note:     def [P`64756, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1752: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1756: error: Unused "type: ignore" comment  [unused-ignore]

core (https://github.com/home-assistant/core)
+ homeassistant/components/lamarzocco/coordinator.py:116: error: Too few arguments  [call-arg]

starlette (https://github.com/encode/starlette)
+ starlette/concurrency.py:38: error: Too few arguments  [call-arg]

optuna (https://github.com/optuna/optuna)
+ optuna/_convert_positional_args.py:83: error: Too few arguments  [call-arg]

github-actions[bot] avatar Sep 12 '24 14:09 github-actions[bot]

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/missing.py:422: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/core/missing.py:422: error: No overload variant of "apply_along_axis" matches argument types "Callable[[ndarray[Any, Any]], None]", "int", "ndarray[Any, Any]"  [call-overload]
+ pandas/core/missing.py:422: note: Error code "call-overload" not covered by "type: ignore" comment
+ pandas/core/missing.py:422: note: Possible overload variants:
+ pandas/core/missing.py:422: note:     def [_P`-1, _SCT: generic] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[_SCT]] | _NestedSequence[_SupportsArray[dtype[_SCT]]]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[_SCT]]
+ pandas/core/missing.py:422: note:     def [_P`-1] apply_along_axis(func1d: Callable[[ndarray[Any, dtype[Any]], **_P], _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], axis: SupportsIndex, arr: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *args: _P.args, **kwargs: _P.kwargs) -> ndarray[Any, dtype[Any]]

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/events.py: note: In function "connect":
+ pwndbg/gdblib/events.py:156: error: Too few arguments  [call-arg]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_resampler.py:237: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:237: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:237: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:237: note: Possible overload variants:
+ tests/test_resampler.py:237: note:     def [P`27163, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:237: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:241: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_resampler.py:244: error: No overload variant of "pipe" of "BaseGroupBy" matches argument types "Callable[[DatetimeIndexResampler[DataFrame], int, list[float], str, NamedArg(tuple[int], 'kw')], DataFrame]", "int", "list[float]", "int", "tuple[int]"  [call-overload]
+ tests/test_resampler.py:244: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_resampler.py:244: note: Possible overload variants:
+ tests/test_resampler.py:244: note:     def [P`27177, T] pipe(self, func: Callable[[DatetimeIndexResampler[DataFrame], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_resampler.py:244: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_resampler.py:248: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3112: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3112: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3112: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3112: note: Possible overload variants:
+ tests/test_series.py:3112: note:     def [P`44288, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3112: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3116: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3119: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_series.py:3119: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[Series[Any], int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], Series[Any]]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_series.py:3119: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_series.py:3119: note: Possible overload variants:
+ tests/test_series.py:3119: note:     def [P`44300, T] pipe(self, func: Callable[[Series[int], **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_series.py:3119: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_series.py:3123: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1745: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1745: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1745: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1745: note: Possible overload variants:
+ tests/test_frame.py:1745: note:     def [P`64786, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1745: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1749: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1752: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/test_frame.py:1752: error: No overload variant of "pipe" of "NDFrame" matches argument types "Callable[[DataFrame, int, list[float], str, NamedArg(tuple[int, int], 'keyword_only')], DataFrame]", "int", "list[float]", "int", "tuple[int, int]"  [call-overload]
+ tests/test_frame.py:1752: note: Error code "call-overload" not covered by "type: ignore" comment
+ tests/test_frame.py:1752: note: Possible overload variants:
+ tests/test_frame.py:1752: note:     def [P`64798, T] pipe(self, func: Callable[[DataFrame, **P], T], *args: P.args, **kwargs: P.kwargs) -> T
+ tests/test_frame.py:1752: note:     def [T] pipe(self, func: tuple[Callable[..., T], str], *args: Any, **kwargs: Any) -> T
+ tests/test_frame.py:1756: error: Unused "type: ignore" comment  [unused-ignore]

core (https://github.com/home-assistant/core)
+ homeassistant/components/lamarzocco/coordinator.py:116: error: Too few arguments  [call-arg]

optuna (https://github.com/optuna/optuna)
+ optuna/_convert_positional_args.py:83: error: Too few arguments  [call-arg]

starlette (https://github.com/encode/starlette)
+ starlette/concurrency.py:38: error: Too few arguments  [call-arg]

github-actions[bot] avatar Sep 24 '24 06:09 github-actions[bot]

Thank you, this is a very nice bug fix

hauntsaninja avatar Sep 24 '24 06:09 hauntsaninja