Resolve ambiguous overload calls by selecting the most general return type among the matched overloads (#2764)#2764
Resolve ambiguous overload calls by selecting the most general return type among the matched overloads (#2764)#2764rchen152 wants to merge 7 commits intofacebook:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5710215 to
85513cf
Compare
Summary: Pull Request resolved: facebook#2764 Differential Revision: D95667476
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
grievejia
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
85513cf to
b82993c
Compare
… type among the matched overloads (facebook#2764) Summary: Previously, if a call to an overloaded function matched more than one overload and the return types of the matched overloads weren't all equivalent, we fell back to a return type of `Any`, as the spec says to do. With this diff, we instead try to select the "most general" return type among the matched overloads, by checking if there exists a return type such that all materializations of every other return type are assignable to it. Some examples of what this means: ```python overload def f(...) -> A[int]: ... overload def f(...) -> A[Any]: ... # Old return type: Any # New return type: A[Any] f(<ambiguous arguments>) ``` ```python overload def f(...) -> bool: ... overload def f(...) -> int: ... # Old return type: Any # New return type: int f(<ambiguous arguments>) ``` ```python overload def f(...) -> A[int]: ... overload def f(...) -> A[str]: ... # Old return type: Any # New return type: Any (neither return type is more general than the other) f(<ambiguous arguments>) ``` We now pass more of numpy and scipy-stubs' assert_type tests: | project | assert_type failures at head | assert_type failures at previous diff | assert_type failures at current diff | | numpy | 134 | 186 | 127 | | scipy-stubs | 49 | 101 | 19 | The trade-off is that we report a lot of new errors on mypy_primer projects. I investigated a bunch of them, and they're not wrong, per se, but some are arguably low-value. Examples: ``` def f(x: Sequence[str], idx) -> str: # The possible types of `x[idx]` are str (if idx is an int) # and Sequence[str] (if idx is a slice). str <: Sequence[str], # so we pick the latter as the return type. # This is technically correct...but idx is probably meant to be an int. return x[idx] # error! ``` ``` def f(x: bool, y) -> bool: # Similar to above, this is technically correct because y may be an int, # but y is probably meant to be a bool. return x & y # error! ``` The LLM classifier seems to have gotten really confused on this one XD The detailed analysis says that Pyrefly is now "stricter than the established ecosystem standard", but we pass more of numpy and scipy-stubs' `assert_type` assertions than before, meaning this diff brings us closer to the ecosystem standard. Because the PR includes the whole stack, it's also complaining about errors introduced in previous diffs. Reviewed By: grievejia Differential Revision: D95667476
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Summary: For facebook#2833. Differential Revision: D97389186
Summary: Our arity filter for overloads was too permissive. It counted min and max arg counts for positional and keyword args separately, so for positional parameters that can be passed either positionally or by name, we'd get weird results like: ``` overload def f(x: int): ... overload def f(x: int, y: str): ... # first signature takes at least 0 and at most 1 posarg, since x could be passed by name # second signature takes at least 0 and at most 2 posargs, since x and y could be passed by name # therefore we don't filter out either overload based on arg count! f(0) ``` Fixed by adding an `overall` arg count filter. This issue is hard to detect because the main symptom is that we fall back to an `Unknown` return type more often than we should. The buggy tests that I added in the previous diff exercise the `overall` arg count code, but the difference isn't observable without the bug fix in the next diff. Differential Revision: D97390936
b82993c to
7ab209d
Compare
… type among the matched overloads (facebook#2764) Summary: Previously, if a call to an overloaded function matched more than one overload and the return types of the matched overloads weren't all equivalent, we fell back to a return type of `Any`, as the spec says to do. With this diff, we instead try to select the "most general" return type among the matched overloads, by checking if there exists a return type such that all materializations of every other return type are assignable to it. Some examples of what this means: ```python overload def f(...) -> A[int]: ... overload def f(...) -> A[Any]: ... # Old return type: Any # New return type: A[Any] f(<ambiguous arguments>) ``` ```python overload def f(...) -> bool: ... overload def f(...) -> int: ... # Old return type: Any # New return type: int f(<ambiguous arguments>) ``` ```python overload def f(...) -> A[int]: ... overload def f(...) -> A[str]: ... # Old return type: Any # New return type: Any (neither return type is more general than the other) f(<ambiguous arguments>) ``` We now pass more of numpy and scipy-stubs' assert_type tests: | project | assert_type failures at head | assert_type failures at previous diff | assert_type failures at current diff | | numpy | 134 | 186 | 127 | | scipy-stubs | 49 | 101 | 19 | The trade-off is that we report a lot of new errors on mypy_primer projects. I investigated a bunch of them, and they're not wrong, per se, but some are arguably low-value. Examples: ``` def f(x: Sequence[str], idx) -> str: # The possible types of `x[idx]` are str (if idx is an int) # and Sequence[str] (if idx is a slice). str <: Sequence[str], # so we pick the latter as the return type. # This is technically correct...but idx is probably meant to be an int. return x[idx] # error! ``` ``` def f(x: bool, y) -> bool: # Similar to above, this is technically correct because y may be an int, # but y is probably meant to be a bool. return x & y # error! ``` Pull Request resolved: facebook#2764 The LLM classifier seems to have gotten really confused on this one XD The detailed analysis says that Pyrefly is now "stricter than the established ecosystem standard", but we pass more of numpy and scipy-stubs' `assert_type` assertions than before, meaning this diff brings us closer to the ecosystem standard. Because the PR includes the whole stack, it's also complaining about errors introduced in previous diffs. Reviewed By: grievejia Differential Revision: D95667476
7ab209d to
35ebc57
Compare
… type among the matched overloads (facebook#2764) Summary: Previously, if a call to an overloaded function matched more than one overload and the return types of the matched overloads weren't all equivalent, we fell back to a return type of `Any`, as the spec says to do. With this diff, we instead try to select the "most general" return type among the matched overloads, by checking if there exists a return type such that all materializations of every other return type are assignable to it. Some examples of what this means: ```python overload def f(...) -> A[int]: ... overload def f(...) -> A[Any]: ... # Old return type: Any # New return type: A[Any] f(<ambiguous arguments>) ``` ```python overload def f(...) -> bool: ... overload def f(...) -> int: ... # Old return type: Any # New return type: int f(<ambiguous arguments>) ``` ```python overload def f(...) -> A[int]: ... overload def f(...) -> A[str]: ... # Old return type: Any # New return type: Any (neither return type is more general than the other) f(<ambiguous arguments>) ``` We now pass more of numpy and scipy-stubs' assert_type tests: | project | assert_type failures at head | assert_type failures at previous diff | assert_type failures at current diff | | numpy | 134 | 186 | 127 | | scipy-stubs | 49 | 101 | 19 | The trade-off is that we report a lot of new errors on mypy_primer projects. I investigated a bunch of them, and they're not wrong, per se, but some are arguably low-value. Examples: ``` def f(x: Sequence[str], idx) -> str: # The possible types of `x[idx]` are str (if idx is an int) # and Sequence[str] (if idx is a slice). str <: Sequence[str], # so we pick the latter as the return type. # This is technically correct...but idx is probably meant to be an int. return x[idx] # error! ``` ``` def f(x: bool, y) -> bool: # Similar to above, this is technically correct because y may be an int, # but y is probably meant to be a bool. return x & y # error! ``` Pull Request resolved: facebook#2764 The LLM classifier seems to have gotten really confused on this one XD The detailed analysis says that Pyrefly is now "stricter than the established ecosystem standard", but we pass more of numpy and scipy-stubs' `assert_type` assertions than before, meaning this diff brings us closer to the ecosystem standard. Because the PR includes the whole stack, it's also complaining about errors introduced in previous diffs. Reviewed By: grievejia Differential Revision: D95667476
This comment has been minimized.
This comment has been minimized.
Summary: If only one overload has a parameter count that is compatible with a call's argument count, we should take that as the matching overload even if the call produces errors. Fixes facebook#2833. Differential Revision: D97394258
…verload resolution is ambiguous Summary: Fixes facebook#2552. Differential Revision: D95512431
Summary: No functional change, just a refactor to make it easier to add a flag controlling what we do when we end up with multiple matches. Differential Revision: D97023844
Summary: Adds flag to toggle whether we follow the overload evaluation algorithm in the spec exactly or do our own thing. For now, the flag does nothing. Differential Revision: D97015419
… type among the matched overloads (facebook#2764) Summary: Previously, if a call to an overloaded function matched more than one overload and the return types of the matched overloads weren't all equivalent, we fell back to a return type of `Any`, as the spec says to do. With this diff, we instead try to select the "most general" return type among the matched overloads, by checking if there exists a return type such that all materializations of every other return type are assignable to it. Some examples of what this means: ```python overload def f(...) -> A[int]: ... overload def f(...) -> A[Any]: ... # Old return type: Any # New return type: A[Any] f(<ambiguous arguments>) ``` ```python overload def f(...) -> bool: ... overload def f(...) -> int: ... # Old return type: Any # New return type: int f(<ambiguous arguments>) ``` ```python overload def f(...) -> A[int]: ... overload def f(...) -> A[str]: ... # Old return type: Any # New return type: Any (neither return type is more general than the other) f(<ambiguous arguments>) ``` We now pass more of numpy and scipy-stubs' assert_type tests: | project | assert_type failures at head | assert_type failures at previous diff | assert_type failures at current diff | | numpy | 134 | 186 | 127 | | scipy-stubs | 49 | 101 | 19 | The trade-off is that we report a lot of new errors on mypy_primer projects. I investigated a bunch of them, and they're not wrong, per se, but some are arguably low-value. Examples: ``` def f(x: Sequence[str], idx) -> str: # The possible types of `x[idx]` are str (if idx is an int) # and Sequence[str] (if idx is a slice). str <: Sequence[str], # so we pick the latter as the return type. # This is technically correct...but idx is probably meant to be an int. return x[idx] # error! ``` ``` def f(x: bool, y) -> bool: # Similar to above, this is technically correct because y may be an int, # but y is probably meant to be a bool. return x & y # error! ``` Pull Request resolved: facebook#2764 The LLM classifier seems to have gotten really confused on this one XD The detailed analysis says that Pyrefly is now "stricter than the established ecosystem standard", but we pass more of numpy and scipy-stubs' `assert_type` assertions than before, meaning this diff brings us closer to the ecosystem standard. Because the PR includes the whole stack, it's also complaining about errors introduced in previous diffs. Reviewed By: grievejia Differential Revision: D95667476
35ebc57 to
cebb1fa
Compare
|
Diff from mypy_primer, showing the effect of this PR on open source code: beartype (https://github.com/beartype/beartype)
- ERROR beartype/_check/error/_pep/pep484585/errpep484585container.py:117:60-77: No matching overload found for function `dict.get` called with arguments: (HintSign | None) [no-matching-overload]
+ ERROR beartype/_check/error/_pep/pep484585/errpep484585container.py:117:61-76: Argument `HintSign | None` is not assignable to parameter `key` with type `HintSign` in function `dict.get` [bad-argument-type]
- ERROR beartype/door/_cls/pep/pep484585/doorpep484585subscripted.py:49:79-50:29: No matching overload found for function `dict.get` called with arguments: (HintSign | None) [no-matching-overload]
streamlit (https://github.com/streamlit/streamlit)
- ERROR lib/streamlit/elements/json.py:134:32-38: No matching overload found for function `list.__init__` called with arguments: (dict[Unknown, Unknown] | object | Unknown) [no-matching-overload]
- ERROR lib/streamlit/elements/json.py:136:28-34: No matching overload found for function `list.__init__` called with arguments: (dict[Unknown, Unknown] | object | Unknown) [no-matching-overload]
+ ERROR lib/streamlit/elements/json.py:134:33-37: Argument `dict[Unknown, Unknown] | object | Unknown` is not assignable to parameter `iterable` with type `Iterable[Unknown]` in function `list.__init__` [bad-argument-type]
+ ERROR lib/streamlit/elements/json.py:136:29-33: Argument `dict[Unknown, Unknown] | object | Unknown` is not assignable to parameter `iterable` with type `Iterable[Unknown]` in function `list.__init__` [bad-argument-type]
- ERROR lib/streamlit/elements/widgets/data_editor.py:204:24-31: No matching overload found for function `list.__init__` called with arguments: (bool | float | int | list[str] | str) [no-matching-overload]
- ERROR lib/streamlit/elements/widgets/data_editor.py:210:24-31: No matching overload found for function `list.__init__` called with arguments: (bool | float | int | list[str] | str) [no-matching-overload]
+ ERROR lib/streamlit/elements/widgets/data_editor.py:204:25-30: Argument `bool | float | int | list[str] | str` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
+ ERROR lib/streamlit/elements/widgets/data_editor.py:210:25-30: Argument `bool | float | int | list[str] | str` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- ERROR lib/streamlit/runtime/state/query_params.py:336:33-40: No matching overload found for function `list.__init__` called with arguments: (Iterable[tuple[str, Iterable[str] | str]] | SupportsKeysAndGetItem[str, Iterable[str] | str]) [no-matching-overload]
+ ERROR lib/streamlit/runtime/state/query_params.py:336:34-39: Argument `Iterable[tuple[str, Iterable[str] | str]] | SupportsKeysAndGetItem[str, Iterable[str] | str]` is not assignable to parameter `iterable` with type `Iterable[tuple[str, Iterable[str] | str]]` in function `list.__init__` [bad-argument-type]
pandera (https://github.com/pandera-dev/pandera)
- ERROR pandera/backends/pandas/error_formatters.py:110:20-36: No matching overload found for function `pandas.core.frame.DataFrame.rename` called with arguments: (Literal['failure_case']) [no-matching-overload]
+ ERROR pandera/backends/pandas/error_formatters.py:110:21-35: Argument `Literal['failure_case']` is not assignable to parameter `mapper` with type `((Any) -> Hashable | None) | Mapping[Any, Hashable | None] | None` in function `pandas.core.frame.DataFrame.rename` [bad-argument-type]
websockets (https://github.com/aaugustin/websockets)
- ERROR src/websockets/extensions/permessage_deflate.py:273:45-52: No matching overload found for function `int.__new__` called with arguments: (type[int], str | None) [no-matching-overload]
- ERROR src/websockets/extensions/permessage_deflate.py:283:45-52: No matching overload found for function `int.__new__` called with arguments: (type[int], str | None) [no-matching-overload]
+ ERROR src/websockets/extensions/permessage_deflate.py:273:46-51: Argument `str | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR src/websockets/extensions/permessage_deflate.py:283:46-51: Argument `str | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- INFO tests/annotations/declarations.py:241:16-244:6: revealed type: Unknown [reveal-type]
+ INFO tests/annotations/declarations.py:241:16-244:6: revealed type: type[Builds[Unknown] | BuildsWithSig[type[str], [object: object = '']] | HydraPartialBuilds[Unknown] | ZenPartialBuilds[Unknown]] [reveal-type]
- INFO tests/annotations/declarations.py:245:16-248:6: revealed type: Unknown [reveal-type]
+ INFO tests/annotations/declarations.py:245:16-248:6: revealed type: type[Builds[Unknown] | BuildsWithSig[type[str], [object: object = '']] | HydraPartialBuilds[Unknown] | ZenPartialBuilds[Unknown]] [reveal-type]
- INFO tests/annotations/declarations.py:261:16-264:6: revealed type: Unknown [reveal-type]
+ INFO tests/annotations/declarations.py:261:16-264:6: revealed type: type[Builds[Unknown] | BuildsWithSig[type[str], [object: object = '']] | HydraPartialBuilds[Unknown] | ZenPartialBuilds[Unknown]] [reveal-type]
- ERROR src/hydra_zen/structured_configs/_implementations.py:2524:53-69: No matching overload found for function `list.__init__` called with arguments: (list[DataClass_ | Mapping[str, Sequence[str] | str | None] | str | type[DataClass_]] | None) [no-matching-overload]
- ERROR src/hydra_zen/structured_configs/_implementations.py:3331:53-69: No matching overload found for function `list.__init__` called with arguments: (list[DataClass_ | Mapping[str, Sequence[str] | str | None] | str | type[DataClass_]] | None) [no-matching-overload]
+ ERROR src/hydra_zen/structured_configs/_implementations.py:2524:54-68: Argument `list[DataClass_ | Mapping[str, Sequence[str] | str | None] | str | type[DataClass_]] | None` is not assignable to parameter `iterable` with type `Iterable[DataClass_ | Mapping[str, Sequence[str] | str | None] | str | type[DataClass_]]` in function `list.__init__` [bad-argument-type]
+ ERROR src/hydra_zen/structured_configs/_implementations.py:3331:54-68: Argument `list[DataClass_ | Mapping[str, Sequence[str] | str | None] | str | type[DataClass_]] | None` is not assignable to parameter `iterable` with type `Iterable[DataClass_ | Mapping[str, Sequence[str] | str | None] | str | type[DataClass_]]` in function `list.__init__` [bad-argument-type]
+ ERROR src/hydra_zen/structured_configs/_implementations.py:3751:12-87: Returned type `Builds[Unknown] | BuildsWithSig[type[Any], [*args: Any, **kwds: Any]] | HydraPartialBuilds[Unknown] | ZenPartialBuilds[Unknown]` is not assignable to declared return type `HydraPartialBuilds[type[_T]] | ZenPartialBuilds[type[_T]]` [bad-return]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ERROR ddtrace/appsec/_ddwaf/waf.py:149:16-18: Returned type `Literal[True] | int` is not assignable to declared return type `bool` [bad-return]
- ERROR ddtrace/contrib/internal/ray/span_manager.py:224:44-59: No matching overload found for function `dict.get` called with arguments: (str | None) [no-matching-overload]
+ ERROR ddtrace/contrib/internal/ray/span_manager.py:224:45-58: Argument `str | None` is not assignable to parameter `key` with type `str` in function `dict.get` [bad-argument-type]
- ERROR ddtrace/internal/coverage/instrumentation_py3_11.py:105:13-21: No matching overload found for function `next` called with arguments: (Iterable[int]) [no-matching-overload]
- ERROR ddtrace/internal/coverage/instrumentation_py3_11.py:110:17-25: No matching overload found for function `next` called with arguments: (Iterable[int]) [no-matching-overload]
+ ERROR ddtrace/internal/coverage/instrumentation_py3_11.py:105:14-20: Argument `Iterable[int]` is not assignable to parameter `i` with type `SupportsNext[@_]` in function `next` [bad-argument-type]
+ ERROR ddtrace/internal/coverage/instrumentation_py3_11.py:108:13-21: `&` is not supported between `SupportsIndex` and `Literal[63]` [unsupported-operation]
+ ERROR ddtrace/internal/coverage/instrumentation_py3_11.py:109:11-19: `&` is not supported between `SupportsIndex` and `Literal[64]` [unsupported-operation]
+ ERROR ddtrace/internal/coverage/instrumentation_py3_11.py:110:18-24: Argument `Iterable[int]` is not assignable to parameter `i` with type `SupportsNext[@_]` in function `next` [bad-argument-type]
+ ERROR ddtrace/internal/coverage/instrumentation_py3_11.py:113:33-41: `&` is not supported between `SupportsIndex` and `Literal[63]` [unsupported-operation]
- ERROR ddtrace/llmobs/_integrations/pydantic_ai.py:55:16-34: Returned type `tuple[str | Any, Unknown | None]` is not assignable to declared return type `tuple[str, str]` [bad-return]
+ ERROR ddtrace/llmobs/_integrations/pydantic_ai.py:55:16-34: Returned type `tuple[str | Any, str | Any | None]` is not assignable to declared return type `tuple[str, str]` [bad-return]
ibis (https://github.com/ibis-project/ibis)
- ERROR ibis/backends/athena/__init__.py:546:42-61: No matching overload found for function `list.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/athena/__init__.py:546:43-60: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/backends/athena/__init__.py:554:26-40: No matching overload found for function `list.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/athena/__init__.py:554:27-39: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/backends/athena/tests/conftest.py:110:21-74: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Attribute, Unknown) [no-matching-overload]
+ ERROR ibis/backends/athena/tests/conftest.py:110:22-51: Argument `Attribute` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
- ERROR ibis/backends/bigquery/__init__.py:991:47-61: No matching overload found for function `list.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/bigquery/__init__.py:991:48-60: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[str]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/backends/bigquery/__init__.py:1009:24-38: No matching overload found for function `list.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/bigquery/__init__.py:1009:25-37: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/backends/clickhouse/__init__.py:401:30-52: No matching overload found for function `pandas.core.frame.DataFrame.__new__` called with arguments: (type[DataFrame], columns=Attribute) [no-matching-overload]
- ERROR ibis/backends/clickhouse/__init__.py:403:30-44: No matching overload found for function `list.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/clickhouse/__init__.py:401:39-51: Argument `Attribute` is not assignable to parameter `columns` with type `ExtensionArray | Index | SequenceNotStr[Any] | Series | ndarray | range | None` in function `pandas.core.frame.DataFrame.__new__` [bad-argument-type]
+ ERROR ibis/backends/clickhouse/__init__.py:403:31-43: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/backends/databricks/__init__.py:595:26-40: No matching overload found for function `list.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/databricks/__init__.py:595:27-39: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/backends/duckdb/tests/test_client.py:499:16-30: No matching overload found for function `list.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/duckdb/tests/test_client.py:499:17-29: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/backends/flink/ddl.py:54:31-59: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Attribute, Attribute) [no-matching-overload]
- ERROR ibis/backends/flink/ddl.py:104:67-81: No matching overload found for function `set.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/flink/ddl.py:54:32-44: Argument `Attribute` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/backends/flink/ddl.py:54:46-58: Argument `Attribute` is not assignable to parameter `iter2` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/backends/flink/ddl.py:104:68-80: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `set.__init__` [bad-argument-type]
- ERROR ibis/backends/flink/utils.py:122:32-63: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Unknown, None) [no-matching-overload]
+ ERROR ibis/backends/flink/utils.py:122:50-62: Argument `None` is not assignable to parameter `iter2` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
- ERROR ibis/backends/impala/__init__.py:773:23-44: No matching overload found for function `set.__init__` called with arguments: (Attribute) [no-matching-overload]
- ERROR ibis/backends/impala/__init__.py:773:51-74: No matching overload found for function `set.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/impala/__init__.py:773:24-43: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `set.__init__` [bad-argument-type]
+ ERROR ibis/backends/impala/__init__.py:773:52-73: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `set.__init__` [bad-argument-type]
- ERROR ibis/backends/impala/__init__.py:784:47-71: No matching overload found for function `frozenset.__new__` called with arguments: (type[frozenset[_T_co]], Attribute) [no-matching-overload]
+ ERROR ibis/backends/impala/__init__.py:784:48-70: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `frozenset.__new__` [bad-argument-type]
- ERROR ibis/backends/impala/tests/conftest.py:134:33-60: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Attribute, Unknown) [no-matching-overload]
+ ERROR ibis/backends/impala/tests/conftest.py:134:34-48: Argument `Attribute` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/backends/impala/tests/test_udf.py:147:38-54: Argument `None` is not assignable to parameter `name` with type `str` in function `getattr` [bad-argument-type]
+ ERROR ibis/backends/impala/tests/test_udf.py:150:38-54: Argument `None` is not assignable to parameter `name` with type `str` in function `getattr` [bad-argument-type]
+ ERROR ibis/backends/impala/tests/test_udf.py:175:31-47: Argument `None` is not assignable to parameter `name` with type `str` in function `getattr` [bad-argument-type]
- ERROR ibis/backends/mssql/__init__.py:791:29-56: No matching overload found for function `map.__new__` called with arguments: (type[map[bool | Unknown]], (value: Unknown, dtype: Unknown) -> bool | Unknown, Unknown, Attribute) [no-matching-overload]
+ ERROR ibis/backends/mssql/__init__.py:791:50-55: Argument `Attribute` is not assignable to parameter `iter2` with type `Iterable[Unknown]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/backends/snowflake/__init__.py:478:26-40: No matching overload found for function `list.__init__` called with arguments: (Attribute) [no-matching-overload]
+ ERROR ibis/backends/snowflake/__init__.py:478:27-39: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/backends/sql/compilers/clickhouse.py:697:36-68: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Unknown, Attribute) [no-matching-overload]
+ ERROR ibis/backends/sql/compilers/clickhouse.py:697:48-67: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[Unknown]` in function `map.__new__` [bad-argument-type]
+ ERROR ibis/backends/tests/base.py:77:17-86: Argument `list[str]` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/backends/tests/base.py:75:16-78:14: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString, chars: LiteralString | None = None, /) -> LiteralString
- (self: str, chars: str | None = None, /) -> str
- ], list[str]) [no-matching-overload]
+ ERROR ibis/backends/tests/test_client.py:1531:70-79: Argument `range` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/backends/tests/test_client.py:1531:43-80: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString
- (self: LiteralString, *args: object, **kwargs: object) -> str
- ], range) [no-matching-overload]
+ ERROR ibis/backends/tests/tpc/ds/test_queries.py:4564:33-75: Argument `tuple[Literal['2000-06-30'], Literal['2000-09-27'], Literal['2000-11-17']]` is not assignable to parameter `iterable` with type `Iterable[Deferred | IntegerValue | int]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/backends/tests/tpc/ds/test_queries.py:4564:26-76: No matching overload found for function `map.__new__` called with arguments: (type[map[DateValue]], Overload[
- (value_or_year: Deferred | IntegerValue | int, month: Deferred | IntegerValue | int, day: Deferred | IntegerValue | int, /) -> DateValue
- (value_or_year: Any, /) -> DateValue
- ], tuple[Literal['2000-06-30'], Literal['2000-09-27'], Literal['2000-11-17']]) [no-matching-overload]
- ERROR ibis/backends/trino/tests/conftest.py:152:21-74: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Attribute, Unknown) [no-matching-overload]
+ ERROR ibis/backends/trino/tests/conftest.py:152:22-51: Argument `Attribute` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/backends/trino/tests/test_client.py:137:70-79: Argument `range` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/backends/trino/tests/test_client.py:137:43-80: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString
- (self: LiteralString, *args: object, **kwargs: object) -> str
- ], range) [no-matching-overload]
+ ERROR ibis/common/selectors.py:45:44-85: Argument `filter[object]` is not assignable to parameter `iterable` with type `Iterable[int | str]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/common/selectors.py:45:24-86: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: Table, what: int | str, /) -> Column
- (self: Table, what: Sequence[int | str] | slice[Any, Any, Any], /) -> Table
- ], filter[object]) [no-matching-overload]
- ERROR ibis/common/temporal.py:202:15-22: No matching overload found for function `int.__new__` called with arguments: (type[int], Real | timedelta | Unknown) [no-matching-overload]
+ ERROR ibis/common/temporal.py:202:16-21: Argument `Real | timedelta | Unknown` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR ibis/examples/gen_registry.py:41:12-47:6: Returned type `Generator[tuple[Unknown, Unknown]]` is not assignable to declared return type `dict[str, str]` [bad-return]
+ ERROR ibis/examples/gen_registry.py:41:12-47:6: Returned type `Generator[tuple[LiteralString, LiteralString]]` is not assignable to declared return type `dict[str, str]` [bad-return]
+ ERROR ibis/examples/gen_registry.py:45:39-72: Argument `list[str]` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/examples/gen_registry.py:45:27-73: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString, chars: LiteralString | None = None, /) -> LiteralString
- (self: str, chars: str | None = None, /) -> str
- ], list[str]) [no-matching-overload]
+ ERROR ibis/examples/gen_registry.py:366:38-49: Argument `KeysView[str]` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/examples/gen_registry.py:366:26-50: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString) -> LiteralString
- (self: str) -> str
- ], KeysView[str]) [no-matching-overload]
- ERROR ibis/expr/api.py:265:38-52: No matching overload found for function `zip.__new__` called with arguments: (type[zip[tuple[str, DataType | str]]], Iterable[str] | None, Iterable[DataType | str] | None) [no-matching-overload]
+ ERROR ibis/expr/api.py:265:39-44: Argument `Iterable[str] | None` is not assignable to parameter `iter1` with type `Iterable[str]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/expr/api.py:265:46-51: Argument `Iterable[DataType | str] | None` is not assignable to parameter `iter2` with type `Iterable[DataType | str]` in function `zip.__new__` [bad-argument-type]
- ERROR ibis/expr/api.py:483:28-487:10: No matching overload found for function `pandas.core.frame.DataFrame.__new__` called with arguments: (type[DataFrame], Any, columns=Attribute | Iterable[str] | None) [no-matching-overload]
+ ERROR ibis/expr/api.py:485:21-486:75: Argument `Attribute | Iterable[str] | None` is not assignable to parameter `columns` with type `ExtensionArray | Index | SequenceNotStr[Any] | Series | ndarray | range | None` in function `pandas.core.frame.DataFrame.__new__` [bad-argument-type]
+ ERROR ibis/expr/datatypes/core.py:879:48-58: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
+ ERROR ibis/expr/datatypes/core.py:879:60-70: Argument `Attribute` is not assignable to parameter `iter2` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/expr/datatypes/core.py:879:30-71: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString
- (self: LiteralString, *args: object, **kwargs: object) -> str
- ], Attribute, Attribute) [no-matching-overload]
+ ERROR ibis/expr/datatypes/tests/test_core.py:126:14-36: Object of class `DataType` has no attribute `bounds` [missing-attribute]
- ERROR ibis/expr/datatypes/tests/test_core.py:407:41-59: No matching overload found for function `zip.__new__` called with arguments: (type[zip[@_]], Attribute, Attribute) [no-matching-overload]
+ ERROR ibis/expr/datatypes/tests/test_core.py:407:42-49: Argument `Attribute` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/expr/datatypes/tests/test_core.py:407:51-58: Argument `Attribute` is not assignable to parameter `iter2` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/expr/datatypes/value.py:276:25-37: Object of class `DataType` has no attribute `bounds` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:279:29-41: Object of class `DataType` has no attribute `bounds` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:303:51-66: Object of class `DataType` has no attribute `precision` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:303:74-85: Object of class `DataType` has no attribute `scale` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:307:32-48: Object of class `DataType` has no attribute `value_type` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:309:41-57: Object of class `DataType` has no attribute `value_type` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:313:29-39: Object of class `DataType` has no attribute `keys` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:317:66-77: Object of class `DataType` has no attribute `items` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:355:37-51: Object of class `DataType` has no attribute `timezone` [missing-attribute]
+ ERROR ibis/expr/datatypes/value.py:363:43-53: Object of class `DataType` has no attribute `unit` [missing-attribute]
- ERROR ibis/expr/operations/core.py:136:23-37: No matching overload found for function `getattr` called with arguments: (Module[ibis.expr.types], None) [no-matching-overload]
+ ERROR ibis/expr/operations/core.py:136:28-36: Argument `None` is not assignable to parameter `name` with type `str` in function `getattr` [bad-argument-type]
- ERROR ibis/expr/operations/reductions.py:212:30-51: No matching overload found for function `max` called with arguments: (object, Literal[38]) [no-matching-overload]
+ ERROR ibis/expr/operations/reductions.py:212:27-214:26: Argument `object | None` is not assignable to parameter `precision` with type `int | None` in function `ibis.expr.datatypes.core.Decimal.__init__` [bad-argument-type]
+ ERROR ibis/expr/operations/reductions.py:212:30-51: `object` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
- ERROR ibis/expr/operations/reductions.py:215:26-42: No matching overload found for function `max` called with arguments: (object, Literal[2]) [no-matching-overload]
+ ERROR ibis/expr/operations/reductions.py:215:23-79: Argument `object | None` is not assignable to parameter `scale` with type `int | None` in function `ibis.expr.datatypes.core.Decimal.__init__` [bad-argument-type]
+ ERROR ibis/expr/operations/reductions.py:215:26-42: `object` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
- ERROR ibis/expr/operations/udf.py:41:22-45: No matching overload found for function `next` called with arguments: (Iterable[int]) [no-matching-overload]
+ ERROR ibis/expr/operations/udf.py:41:23-44: Argument `Iterable[int]` is not assignable to parameter `i` with type `SupportsNext[@_]` in function `next` [bad-argument-type]
- ERROR ibis/expr/operations/udf.py:141:22-153:10: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, FrozenDict[@_, @_] | InputType | Namespace | property | str | Unknown]) [no-matching-overload]
+ ERROR ibis/expr/operations/udf.py:141:22-153:10: No matching overload found for function `typing.MutableMapping.update` called with arguments: (dict[str, DataType | FrozenDict[@_, @_] | InputType | Namespace | property | str]) [no-matching-overload]
- ERROR ibis/expr/operations/udf.py:155:20-71: No matching overload found for function `type.__new__` called with arguments: (type[type], str, tuple[[B: Value[Unknown]](self: Self@_UDF) -> type[B]], dict[str, Argument]) [no-matching-overload]
+ ERROR ibis/expr/operations/udf.py:155:50-62: Argument `tuple[[B: Value[Unknown]](self: Self@_UDF) -> type[B]]` is not assignable to parameter `bases` with type `tuple[type[Any], ...]` in function `type.__new__` [bad-argument-type]
- ERROR ibis/expr/schema.py:36:28-45: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], (obj: Sized, /) -> int, Attribute) [no-matching-overload]
+ ERROR ibis/expr/schema.py:36:34-44: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[Sized]` in function `map.__new__` [bad-argument-type]
+ ERROR ibis/expr/schema.py:474:19-32: Argument `DataType` is not assignable to parameter `fields` with type `FrozenOrderedDict[str, DataType]` in function `Schema.__init__` [bad-argument-type]
- ERROR ibis/expr/tests/test_schema.py:200:41-59: No matching overload found for function `zip.__new__` called with arguments: (type[zip[@_]], Attribute, Attribute) [no-matching-overload]
+ ERROR ibis/expr/tests/test_schema.py:200:42-49: Argument `Attribute` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/expr/tests/test_schema.py:200:51-58: Argument `Attribute` is not assignable to parameter `iter2` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
- ERROR ibis/expr/types/relations.py:939:39-53: No matching overload found for function `frozenset.__new__` called with arguments: (type[frozenset[_T_co]], Attribute) [no-matching-overload]
+ ERROR ibis/expr/types/relations.py:939:40-52: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `frozenset.__new__` [bad-argument-type]
- ERROR ibis/expr/types/relations.py:3216:54-74: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], (obj: object, /) -> str, Attribute) [no-matching-overload]
+ ERROR ibis/expr/types/relations.py:3216:61-73: Argument `Attribute` is not assignable to parameter `iterable` with type `Iterable[object]` in function `map.__new__` [bad-argument-type]
- ERROR ibis/expr/types/relations.py:4503:31-70: `dict[str, Any | None]` is not assignable to variable `names_transform` with type `((str) -> Value) | Mapping[str, (str) -> Value] | None` [bad-assignment]
- ERROR ibis/expr/types/relations.py:4513:13-39: Object of class `FunctionType` has no attribute `setdefault`
+ ERROR ibis/expr/types/relations.py:4513:13-39: Object of class `Mapping` has no attribute `setdefault` [missing-attribute]
- Object of class `Mapping` has no attribute `setdefault`
- Object of class `NoneType` has no attribute `setdefault` [missing-attribute]
- ERROR ibis/expr/types/relations.py:4526:23-44: `(str) -> Value` is not subscriptable [unsupported-operation]
- ERROR ibis/expr/types/relations.py:4526:23-44: `None` is not subscriptable [unsupported-operation]
- ERROR ibis/expr/types/relations.py:4963:25-68: No matching overload found for function `list.__init__` called with arguments: (map[tuple[Unknown, ...]]) [no-matching-overload]
+ ERROR ibis/expr/types/relations.py:4963:26-67: Argument `map[tuple[Unknown, ...]]` is not assignable to parameter `iterable` with type `Iterable[str]` in function `list.__init__` [bad-argument-type]
- ERROR ibis/expr/visualize.py:53:30-58: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Attribute | Unknown, Attribute | Unknown) [no-matching-overload]
+ ERROR ibis/expr/visualize.py:53:31-43: Argument `Attribute | Unknown` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/expr/visualize.py:53:45-57: Argument `Attribute | Unknown` is not assignable to parameter `iter2` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
- ERROR ibis/formats/pandas.py:93:24-38: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Attribute, list[Unknown]) [no-matching-overload]
+ ERROR ibis/formats/pandas.py:93:25-30: Argument `Attribute` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
- ERROR ibis/legacy/udf/vectorized.py:38:12-46: Returned type `dict[str, @_]` is not assignable to declared return type `tuple[Unknown, ...]` [bad-return]
+ ERROR ibis/legacy/udf/vectorized.py:38:12-46: Returned type `dict[str, Any | Unknown]` is not assignable to declared return type `tuple[Unknown, ...]` [bad-return]
- ERROR ibis/legacy/udf/vectorized.py:38:20-45: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Attribute, Series | list[Unknown] | ndarray) [no-matching-overload]
+ ERROR ibis/legacy/udf/vectorized.py:38:21-38: Argument `Attribute` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR ibis/legacy/udf/vectorized.py:250:51-67: Argument `DataType` is not assignable to parameter `output_type` with type `Struct` in function `_coerce_to_np_array` [bad-argument-type]
+ ERROR ibis/legacy/udf/vectorized.py:250:51-67: Argument `DataType` is not assignable to parameter `output_type` with type `Struct` in function `_coerce_to_dict` [bad-argument-type]
+ ERROR ibis/legacy/udf/vectorized.py:250:51-67: Argument `DataType` is not assignable to parameter `output_type` with type `Struct` in function `_coerce_to_dataframe` [bad-argument-type]
+ ERROR ibis/tests/benchmarks/test_benchmarks.py:1025:33-46: Argument `range` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
... (truncated 8 lines) ...
build (https://github.com/pypa/build)
+ ERROR src/build/__main__.py:150:79-106: Argument `TextIOWrapper` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR src/build/__main__.py:150:67-107: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString, chars: LiteralString | None = None, /) -> LiteralString
- (self: str, chars: str | None = None, /) -> str
- ], TextIOWrapper) [no-matching-overload]
sockeye (https://github.com/awslabs/sockeye)
- ERROR sockeye/data_io.py:1147:61-1149:108: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], list[BucketBatchSize], list[int], list[tuple[float | None, float | None]] | None) [no-matching-overload]
+ ERROR sockeye/data_io.py:1149:62-107: Argument `list[tuple[float | None, float | None]] | None` is not assignable to parameter `iter3` with type `Iterable[tuple[float | None, float | None]]` in function `zip.__new__` [bad-argument-type]
- ERROR sockeye/model.py:816:40-68: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], list[str], list[int] | None) [no-matching-overload]
+ ERROR sockeye/model.py:816:56-67: Argument `list[int] | None` is not assignable to parameter `iter2` with type `Iterable[int]` in function `zip.__new__` [bad-argument-type]
- ERROR test/unit/test_inference.py:138:47-77: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], list[list[str]] | None, Unknown) [no-matching-overload]
+ ERROR test/unit/test_inference.py:138:48-67: Argument `list[list[str]] | None` is not assignable to parameter `iter1` with type `Iterable[list[str]]` in function `zip.__new__` [bad-argument-type]
- ERROR test/unit/test_inference.py:177:78-148: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], list[list[str]] | None, list[list[str]] | None) [no-matching-overload]
+ ERROR test/unit/test_inference.py:177:79-112: Argument `list[list[str]] | None` is not assignable to parameter `iter1` with type `Iterable[list[str]]` in function `zip.__new__` [bad-argument-type]
+ ERROR test/unit/test_inference.py:177:114-147: Argument `list[list[str]] | None` is not assignable to parameter `iter2` with type `Iterable[list[str]]` in function `zip.__new__` [bad-argument-type]
+ ERROR test/unit/test_utils.py:202:22-38: No matching overload found for function `print` called with arguments: (str, file=GzipFile | IO[Any] | TextIOWrapper) [no-matching-overload]
svcs (https://github.com/hynek/svcs)
- ERROR tests/typing/mypy.py:19:18-22: No matching overload found for function `svcs._core.Container.get` called with arguments: (type[S1]) [no-matching-overload]
- ERROR tests/typing/mypy.py:20:18-22: No matching overload found for function `svcs._core.Container.get` called with arguments: (type[S2]) [no-matching-overload]
+ ERROR tests/typing/mypy.py:19:19-21: Argument `type[S1]` is not assignable to parameter `svc_type` with type `type[@_]` in function `svcs._core.Container.get` [bad-argument-type]
+ ERROR tests/typing/mypy.py:20:19-21: Argument `type[S2]` is not assignable to parameter `svc_type` with type `type[@_]` in function `svcs._core.Container.get` [bad-argument-type]
vision (https://github.com/pytorch/vision)
+ ERROR torchvision/prototype/datasets/utils/_encoded.py:46:34-38: Argument `IO[Any]` is not assignable to parameter `file` with type `BinaryIO` in function `EncodedData.from_file` [bad-argument-type]
- ERROR torchvision/transforms/functional.py:573:27-40: No matching overload found for function `int.__new__` called with arguments: (type[int], Number & list[int]) [no-matching-overload]
- ERROR torchvision/transforms/functional.py:573:45-58: No matching overload found for function `int.__new__` called with arguments: (type[int], Number & list[int]) [no-matching-overload]
+ ERROR torchvision/transforms/functional.py:573:28-39: Argument `Number & list[int]` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR torchvision/transforms/functional.py:573:46-57: Argument `Number & list[int]` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR torchvision/transforms/functional.py:799:20-26: No matching overload found for function `int.__new__` called with arguments: (type[int], Number & list[int]) [no-matching-overload]
- ERROR torchvision/transforms/functional.py:799:31-37: No matching overload found for function `int.__new__` called with arguments: (type[int], Number & list[int]) [no-matching-overload]
+ ERROR torchvision/transforms/functional.py:799:21-25: Argument `Number & list[int]` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR torchvision/transforms/functional.py:799:32-36: Argument `Number & list[int]` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR torchvision/transforms/functional.py:850:20-26: No matching overload found for function `int.__new__` called with arguments: (type[int], Number & list[int]) [no-matching-overload]
- ERROR torchvision/transforms/functional.py:850:31-37: No matching overload found for function `int.__new__` called with arguments: (type[int], Number & list[int]) [no-matching-overload]
+ ERROR torchvision/transforms/functional.py:850:21-25: Argument `Number & list[int]` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR torchvision/transforms/functional.py:850:32-36: Argument `Number & list[int]` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR torchvision/transforms/v2/functional/_geometry.py:2549:16-29: No matching overload found for function `int.__new__` called with arguments: (type[int], Number & list[int]) [no-matching-overload]
- ERROR torchvision/transforms/v2/functional/_geometry.py:2882:16-22: No matching overload found for function `int.__new__` called with arguments: (type[int], Number & list[int]) [no-matching-overload]
+ ERROR torchvision/transforms/v2/functional/_geometry.py:2549:17-28: Argument `Number & list[int]` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR torchvision/transforms/v2/functional/_geometry.py:2882:17-21: Argument `Number & list[int]` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR torchvision/utils.py:398:22-36: `+` is not supported between `int` and `tuple[Literal[100]]` [unsupported-operation]
+ ERROR torchvision/utils.py:398:22-36: `+` is not supported between `str` and `tuple[Literal[100]]` [unsupported-operation]
numpy-stl (https://github.com/WoLpH/numpy-stl)
+ ERROR stl/base.py:419:28-74: `ndarray[tuple[Any, ...], dtype[float64 | Any]]` is not assignable to `ndarray[tuple[int, int], dtype[floating[_32Bit]]]` [bad-assignment]
+ ERROR stl/base.py:445:23-69: `ndarray[tuple[Any, ...], dtype[float64 | Any]]` is not assignable to variable `normals` with type `ndarray[tuple[int, int], dtype[floating[_32Bit]]] | None` [bad-assignment]
+ ERROR stl/base.py:447:32-42: `**` is not supported between `None` and `Literal[2]` [unsupported-operation]
urllib3 (https://github.com/urllib3/urllib3)
- ERROR test/with_dummyserver/test_https.py:760:43-45: No matching overload found for function `contextlib.nullcontext.__init__` called with arguments: () [no-matching-overload]
+ ERROR test/with_dummyserver/test_https.py:760:43-45: Argument `nullcontext[object]` is not assignable to parameter `self` with type `nullcontext[None]` in function `contextlib.nullcontext.__init__` [bad-argument-type]
+ ERROR src/urllib3/_request_methods.py:123:54-68: Argument `KeysView[str] | dict_keys[str, str]` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR src/urllib3/_request_methods.py:123:42-69: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString) -> LiteralString
- (self: str) -> str
- ], KeysView[str] | dict_keys[str, str]) [no-matching-overload]
- ERROR src/urllib3/util/timeout.py:271:30-84: No matching overload found for function `min` called with arguments: (float, _TYPE_DEFAULT | float) [no-matching-overload]
+ ERROR src/urllib3/util/timeout.py:271:20-85: Returned type `_TYPE_DEFAULT | float` is not assignable to declared return type `float | None` [bad-return]
+ ERROR src/urllib3/util/timeout.py:271:23-85: `_TYPE_DEFAULT | float` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
+ ERROR src/urllib3/util/timeout.py:271:30-84: `_TYPE_DEFAULT | float` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
Expression (https://github.com/cognitedata/Expression)
- ERROR tests/test_array.py:47:31-51: No matching overload found for function `expression.core.pipe.pipe` called with arguments: (TypedArray[int], (TypedArray[object]) -> TypedArray[str]) [no-matching-overload]
+ ERROR tests/test_array.py:47:36-50: Argument `(TypedArray[object]) -> TypedArray[str]` is not assignable to parameter `fn1` with type `(TypedArray[int]) -> @_` in function `expression.core.pipe.pipe` [bad-argument-type]
PyWinCtl (https://github.com/Kalmat/PyWinCtl)
+ ERROR src/pywinctl/_pywinctl_linux.py:698:30-82: `Resource` is not assignable to `Window` [bad-assignment]
freqtrade (https://github.com/freqtrade/freqtrade)
+ ERROR freqtrade/data/converter/converter.py:158:18-65: `DataFrame | Series` is not assignable to variable `df` with type `DataFrame` [bad-assignment]
+ ERROR freqtrade/data/converter/converter.py:160:14-60: `DataFrame | Series` is not assignable to variable `df` with type `DataFrame` [bad-assignment]
- ERROR freqtrade/freqai/data_kitchen.py:179:29-44: No matching overload found for function `pandas.core.frame.DataFrame.__new__` called with arguments: (type[DataFrame], Buffer | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype]] | _SupportsArray[dtype] | bytes | complex | ndarray[tuple[int], dtype[float64]] | str | Unknown) [no-matching-overload]
+ ERROR freqtrade/freqai/data_kitchen.py:179:30-43: Argument `Buffer | _NestedSequence[bytes | complex | str] | _NestedSequence[_SupportsArray[dtype]] | _SupportsArray[dtype] | bytes | complex | ndarray[tuple[int], dtype[float64]] | str | Unknown` is not assignable to parameter `data` with type `DataFrame | Index | Iterable[Index | Sequence[Any] | Series | dict[Any, Any] | ndarray[tuple[int]] | tuple[Hashable, ListLikeU]] | Sequence[Any] | Series | dict[Any, Any] | ndarray[tuple[int]] | None` in function `pandas.core.frame.DataFrame.__new__` [bad-argument-type]
+ ERROR freqtrade/freqai/freqai_interface.py:350:21-41: Argument `DataFrame | Series` is not assignable to parameter `dataframe` with type `DataFrame` in function `freqtrade.strategy.interface.IStrategy.set_freqai_targets` [bad-argument-type]
+ ERROR freqtrade/freqai/freqai_interface.py:354:21-44: Argument `DataFrame | Series` is not assignable to parameter `dataframe` with type `DataFrame` in function `freqtrade.strategy.interface.IStrategy.set_freqai_targets` [bad-argument-type]
scikit-learn (https://github.com/scikit-learn/scikit-learn)
- ERROR sklearn/_loss/loss.py:1070:9-24: Class member `HalfMultinomialLoss.in_y_true_range` overrides parent class `BaseLoss` in an inconsistent manner [bad-override]
- ERROR sklearn/_loss/loss.py:1100:23-39: No matching overload found for function `range.__new__` called with arguments: (type[range], Unknown | None) [no-matching-overload]
+ ERROR sklearn/_loss/loss.py:1100:24-38: Argument `Unknown | None` is not assignable to parameter `stop` with type `SupportsIndex` in function `range.__new__` [bad-argument-type]
- ERROR sklearn/cluster/_affinity_propagation.py:533:9-537:10: Cannot unpack tuple[list[Unknown] | ndarray[tuple[Any, ...], dtype[Unknown]], ndarray[tuple[Any, ...], dtype[Unknown]]] | tuple[list[Unknown] | ndarray[tuple[Any, ...], dtype[Unknown]], ndarray[tuple[Any, ...], dtype[Unknown]], int] | tuple[ndarray, ndarray] | tuple[ndarray, ndarray, Literal[0]] | tuple[Unknown, Unknown] | tuple[Unknown, Unknown, Literal[0]] (of size 2) into 3 values [bad-unpacking]
+ ERROR sklearn/cluster/_affinity_propagation.py:533:9-537:10: Cannot unpack tuple[list[Unknown] | ndarray, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[list[Unknown] | ndarray, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown, int] | tuple[ndarray[tuple[Unknown], dtype[Any | Unknown]], ndarray[tuple[Unknown], dtype[Any | Unknown]]] | tuple[ndarray[tuple[Unknown], dtype[Any | Unknown]], ndarray[tuple[Unknown], dtype[Any | Unknown]], Literal[0]] | tuple[ndarray, ndarray] | tuple[ndarray, ndarray, Literal[0]] (of size 2) into 3 values [bad-unpacking]
- ERROR sklearn/cluster/_agglomerative.py:686:13-26: Object of class `ndarray` has no attribute `append` [missing-attribute]
- ERROR sklearn/cluster/_agglomerative.py:1085:32-47: `int | Unknown` is not assignable to attribute `n_clusters_` with type `signedinteger[_NBitIntP]` [bad-assignment]
- ERROR sklearn/cluster/_bicluster.py:613:48-85: No matching overload found for function `numpy.lib._shape_base_impl.apply_along_axis` called with arguments: ((v: Unknown) -> ndarray[tuple[int], dtype[Unknown]] | Unknown, axis=Literal[1], arr=Unknown) [no-matching-overload]
+ ERROR sklearn/cluster/_bicluster.py:613:48-85: No matching overload found for function `numpy.lib._shape_base_impl.apply_along_axis` called with arguments: ((v: Unknown) -> ndarray[tuple[int], Unknown] | Unknown, axis=Literal[1], arr=Unknown) [no-matching-overload]
+ ERROR sklearn/cluster/_birch.py:182:30-65: `ndarray[tuple[Any, ...], Unknown]` is not assignable to attribute `squared_norm_` with type `list[Unknown]` [bad-assignment]
- ERROR sklearn/cluster/_kmeans.py:1548:36-49: No matching overload found for function `set.__init__` called with arguments: (Unknown | None) [no-matching-overload]
+ ERROR sklearn/cluster/_kmeans.py:1548:37-48: Argument `ndarray | Unknown | None` is not assignable to parameter `iterable` with type `Iterable[Any | Unknown]` in function `set.__init__` [bad-argument-type]
- ERROR sklearn/cluster/_kmeans.py:1954:30-59: No matching overload found for function `min` called with arguments: (Unknown | None, Unknown) [no-matching-overload]
+ ERROR sklearn/cluster/_kmeans.py:1954:30-59: `Unknown | None` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
+ ERROR sklearn/cluster/_spectral.py:163:41-166:14: No matching overload found for function `scipy.sparse._csc.csc_array.__init__` called with arguments: (tuple[ndarray[tuple[int], dtype[float64]], tuple[ndarray[tuple[int], dtype[float64 | Any]], Unknown]], shape=tuple[Unknown, Unknown]) [no-matching-overload]
- ERROR sklearn/cluster/tests/test_hierarchical.py:88:9-49: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:88:9-49: Cannot unpack tuple[ndarray | Unknown, int, Any, None] | tuple[ndarray | Unknown, int, Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]], Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_hierarchical.py:119:21-56: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_hierarchical.py:133:9-44: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:119:21-56: Cannot unpack tuple[ndarray | Unknown, int, Any, None] | tuple[ndarray | Unknown, int, Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]], Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:133:9-44: Cannot unpack tuple[ndarray | Unknown, int, Any, None] | tuple[ndarray | Unknown, int, Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]], Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_hierarchical.py:353:13-37: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:353:13-37: Cannot unpack tuple[ndarray | Unknown, int, Any, None] | tuple[ndarray | Unknown, int, Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]], Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]], Unknown] | Unknown (of size 5) into 4 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_hierarchical.py:386:5-29: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] (of size 5) into 4 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:386:5-29: Cannot unpack tuple[ndarray | Unknown, int, Any, None] | tuple[ndarray | Unknown, int, Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]], Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]], Unknown] (of size 5) into 4 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_hierarchical.py:752:9-60: Cannot unpack tuple[ndarray | Unknown, int, int | Any, None] | tuple[ndarray | Unknown, int, int | Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, int | Any, ndarray[tuple[Unknown], dtype[Unknown]], ndarray[tuple[Unknown], dtype[Unknown]] | ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown], dtype[Unknown]], Unknown] | Unknown (of size 4) into 5 values [bad-unpacking]
+ ERROR sklearn/cluster/tests/test_hierarchical.py:752:9-60: Cannot unpack tuple[ndarray | Unknown, int, Any, None] | tuple[ndarray | Unknown, int, Any, None, ndarray[tuple[Any, ...], dtype[Unknown]] | Unknown] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]]] | tuple[ndarray[tuple[Any, ...], dtype[Unknown]], int, Any, ndarray[tuple[Unknown]], Unknown] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]]] | tuple[Unknown, Unknown, Unknown, ndarray[tuple[Unknown]], Unknown] | Unknown (of size 4) into 5 values [bad-unpacking]
- ERROR sklearn/cluster/tests/test_k_means.py:886:19-31: No matching overload found for function `set.__init__` called with arguments: (Unknown | None) [no-matching-overload]
+ ERROR sklearn/cluster/tests/test_k_means.py:886:20-30: Argument `ndarray | Unknown | None` is not assignable to parameter `iterable` with type `Iterable[Any | Unknown]` in function `set.__init__` [bad-argument-type]
- ERROR sklearn/cluster/tests/test_k_means.py:975:19-31: No matching overload found for function `set.__init__` called with arguments: (Unknown | None) [no-matching-overload]
+ ERROR sklearn/cluster/tests/test_k_means.py:975:20-30: Argument `ndarray | Unknown | None` is not assignable to parameter `iterable` with type `Iterable[Any | Unknown]` in function `set.__init__` [bad-argument-type]
- ERROR sklearn/compose/_column_transformer.py:1087:35-49: No matching overload found for function `set.__init__` called with arguments: (ndarray | None) [no-matching-overload]
+ ERROR sklearn/compose/_column_transformer.py:1087:36-48: Argument `ndarray | None` is not assignable to parameter `iterable` with type `Iterable[Any]` in function `set.__init__` [bad-argument-type]
+ ERROR sklearn/covariance/_empirical_covariance.py:215:31-35: `None` is not assignable to attribute `precision_` with type `ndarray[tuple[Any, ...], dtype[inexact]]` [bad-assignment]
- ERROR sklearn/covariance/_graph_lasso.py:1046:28-50: No matching overload found for function `zip.__new__` called with arguments: (type[zip[Unknown]], int | Unknown, zip[tuple[Any, ...]], zip[tuple[Any, ...]]) [no-matching-overload]
+ ERROR sklearn/covariance/_graph_lasso.py:1046:29-35: Argument `int | ndarray | Unknown` is not assignable to parameter `iter1` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
- ERROR sklearn/datasets/_arff_parser.py:191:25-49: No matching overload found for function `next` called with arguments: (Iterator[list[Unknown]] | tuple[list[Unknown], ...]) [no-matching-overload]
+ ERROR sklearn/datasets/_arff_parser.py:191:26-48: Argument `Iterator[list[Unknown]] | tuple[list[Unknown], ...]` is not assignable to parameter `i` with type `SupportsNext[list[Unknown]]` in function `next` [bad-argument-type]
- ERROR sklearn/datasets/_base.py:1341:23-1345:6: No matching overload found for function `sorted` called with arguments: (Generator[Traversable]) [no-matching-overload]
+ ERROR sklearn/datasets/_base.py:1341:23-1345:6: `Traversable` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
- ERROR sklearn/datasets/_samples_generator.py:1143:36-60: No matching overload found for function `int.__new__` called with arguments: (type[int], _RealLike | int | Unknown) [no-matching-overload]
- ERROR sklearn/datasets/_samples_generator.py:1145:23-46: No matching overload found for function `range.__new__` called with arguments: (type[range], _RealLike | int | Unknown) [no-matching-overload]
+ ERROR sklearn/datasets/_samples_generator.py:1143:37-59: Argument `_RealLike | int | Unknown` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR sklearn/datasets/_samples_generator.py:1145:24-45: Argument `_RealLike | int | Unknown` is not assignable to parameter `stop` with type `SupportsIndex` in function `range.__new__` [bad-argument-type]
+ ERROR sklearn/datasets/_samples_generator.py:1152:60-71: Argument `float | ndarray[tuple[int]] | Unknown` is not assignable to parameter `iter2` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR sklearn/datasets/_samples_generator.py:1621:15-38: `ndarray[tuple[Any, ...], dtype[float64]] | ndarray | Unknown` is not assignable to upper bound `generic` of type variable `_ScalarT` [bad-specialization]
+ ERROR sklearn/datasets/_samples_generator.py:1843:11-27: Cannot index into `_spbase[Unknown, tuple[int, int]]` [bad-index]
- ERROR sklearn/datasets/_samples_generator.py:1152:37-72: No matching overload found for function `zip.__new__` called with arguments: (type[zip[@_]], Iterable[Unknown] | list[int] | Unknown, float | ndarray[tuple[int]] | Unknown) [no-matching-overload]
- ERROR sklearn/datasets/_samples_generator.py:1621:15-38: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- [_ScalarT: generic](a: _ScalarT, axis: Sequence[SupportsIndex] | SupportsIndex | None = None) -> _ScalarT
- [_ScalarT: generic](a: _ArrayLike, axis: Sequence[SupportsIndex] | SupportsIndex | None = None) -> ndarray[tuple[Any, ...], dtype[_ScalarT]]
- (a: ArrayLike, axis: Sequence[SupportsIndex] | SupportsIndex | None = None) -> ndarray
- ], tuple[Unknown, ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[int, int], dtype[float64]]]) [no-matching-overload]
+ ERROR sklearn/datasets/tests/test_openml.py:121:30-51: Argument `bytes | str` is not assignable to parameter `initial_bytes` with type `Buffer` in function `_io.BytesIO.__init__` [bad-argument-type]
+ ERROR sklearn/datasets/tests/test_openml.py:169:25-53: Object of class `str` has no attribute `decode` [missing-attribute]
+ ERROR sklearn/datasets/tests/test_openml.py:182:30-51: Argument `bytes | str` is not assignable to parameter `initial_bytes` with type `Buffer` in function `_io.BytesIO.__init__` [bad-argument-type]
- ERROR sklearn/decomposition/_dict_learning.py:178:36-52: No matching overload found for function `int.__new__` called with arguments: (type[int], Unknown | None) [no-matching-overload]
+ ERROR sklearn/decomposition/_dict_learning.py:178:37-51: Argument `Unknown | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR sklearn/decomposition/_dict_learning.py:195:32-48: No matching overload found for function `int.__new__` called with arguments: (type[int], Unknown | None) [no-matching-overload]
+ ERROR sklearn/decomposition/_dict_learning.py:195:33-47: Argument `Unknown | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR sklearn/decomposition/_dict_learning.py:2179:21-74: `/` is not supported between `floating` and `None` [unsupported-operation]
+ ERROR sklearn/decomposition/_dict_learning.py:2179:21-74: `/` is not supported between `ndarray[_WorkaroundForPyright, dtype[floating]]` and `None` [unsupported-operation]
- ERROR sklearn/decomposition/_lda.py:526:32-67: `float | ndarray[tuple[Any, ...], dtype[float64]] | Unknown` is not assignable to attribute `components_` with type `ndarray[tuple[Any, ...], dtype[float64]]` [bad-assignment]
+ ERROR sklearn/decomposition/_lda.py:526:32-67: `float | ndarray[tuple[Any, ...], dtype[float64]] | Unknown` is not assignable to attribute `components_` with type `ndarray` [bad-assignment]
+ ERROR sklearn/decomposition/_pca.py:740:28-77: `signedinteger[_8Bit] | Any` is not assignable to upper bound `complex128 | complexfloating[_32Bit, _32Bit] | float64 | floating[_32Bit]` of type variable `_SCT` [bad-specialization]
+ ERROR sklearn/discriminant_analysis.py:757:21-39: `@` is not supported between `str` and `ndarray[tuple[Any, ...], dtype[complex128 | complexfloating[_32Bit, _32Bit] | float64 | floating[_32Bit]]]` [unsupported-operation]
+ ERROR sklearn/discriminant_analysis.py:757:21-39: `@` is not supported between `tuple[str | Unknown, str | Unknown]` and `ndarray[tuple[Any, ...], dtype[complex128 | complexfloating[_32Bit, _32Bit] | float64 | floating[_32Bit]]]` [unsupported-operation]
- ERROR sklearn/dummy.py:308:28-314:18: No matching overload found for function `numpy.lib._shape_base_impl.tile` called with arguments: (list[ndarray[tuple[Any, ...], Unknown] | Unknown], list[Integral | int | Unknown]) [no-matching-overload]
+ ERROR sklearn/dummy.py:308:28-314:18: No matching overload found for function `numpy.lib._shape_base_impl.tile` called with arguments: (list[Unknown], list[Integral | int | Unknown]) [no-matching-overload]
- ERROR sklearn/ensemble/_forest.py:301:29-41: No matching overload found for function `scipy.sparse._construct.hstack` called with arguments: (Generator[Unknown | None, Unknown] | list[Unknown | None]) [no-matching-overload]
+ ERROR sklearn/ensemble/_forest.py:301:30-40: Argument `Generator[Unknown | None, Unknown] | list[Unknown | None]` is not assignable to parameter `blocks` with type `Sequence[_CanStack[@_]]` in function `scipy.sparse._construct.hstack` [bad-argument-type]
- ERROR sklearn/ensemble/_gb.py:2192:9-14: Class member `GradientBoostingRegressor.apply` overrides parent class `BaseGradientBoosting` in an inconsistent manner [bad-override]
+ ERROR sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py:333:13-47: Object of class `NoneType` has no attribute `output_indices_` [missing-attribute]
- ERROR sklearn/ensemble/_hist_gradient_boosting/tests/test_histogram.py:238:25-39: Cannot index into `ndarray[tuple[int, int], dtype[float64]]` [bad-index]
- ERROR sklearn/ensemble/_hist_gradient_boosting/tests/test_histogram.py:238:41-59: Cannot index into `ndarray[tuple[Any, ...], dtype[float64]]` [bad-index]
- ERROR sklearn/ensemble/_hist_gradient_boosting/tests/test_histogram.py:239:25-40: Cannot index into `ndarray[tuple[int, int], dtype[float64]]` [bad-index]
- ERROR sklearn/ensemble/_hist_gradient_boosting/tests/test_histogram.py:239:42-61: Cannot index into `ndarray[tuple[Any, ...], dtype[float64]]` [bad-index]
- ERROR sklearn/ensemble/_stacking.py:239:24-51: No matching overload found for function `getattr` called with arguments: (Any, Unknown | None) [no-matching-overload]
+ ERROR sklearn/ensemble/_stacking.py:239:36-50: Argument `Unknown | None` is not assignable to parameter `name` with type `str` in function `getattr` [bad-argument-type]
- ERROR sklearn/ensemble/_stacking.py:296:20-31: No matching overload found for function `getattr` called with arguments: (Unknown, Unknown | None) [no-matching-overload]
+ ERROR sklearn/ensemble/_stacking.py:296:26-30: Argument `Unknown | None` is not assignable to parameter `name` with type `str` in function `getattr` [bad-argument-type]
- ERROR sklearn/ensemble/_voting.py:71:36-67: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Unknown, object) [no-matching-overload]
+ ERROR sklearn/ensemble/_voting.py:71:54-66: Argument `object` is not assignable to parameter `iter2` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
- ERROR sklearn/feature_extraction/image.py:346:51-64: No matching overload found for function `list.__init__` called with arguments: (int | tuple[Unknown, ...] | Unknown) [no-matching-overload]
+ ERROR sklearn/feature_extraction/image.py:346:52-63: Argument `int | tuple[Unknown, ...] | Unknown` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
+ ERROR sklearn/feature_selection/_rfe.py:455:9-26: Class member `RFE._get_support_mask` overrides parent class `SelectorMixin` in an inconsistent manner [bad-override]
+ ERROR sklearn/feature_selection/_sequential.py:332:9-26: Class member `SequentialFeatureSelector._get_support_mask` overrides parent class `SelectorMixin` in an inconsistent manner [bad-override]
+ ERROR sklearn/feature_selection/_univariate_selection.py:787:9-26: Class member `SelectKBest._get_support_mask` overrides parent class `_BaseFilter` in an inconsistent manner [bad-override]
+ ERROR sklearn/feature_selection/tests/test_base.py:24:9-26: Class member `StepSelector._get_support_mask` overrides parent class `SelectorMixin` in an inconsistent manner [bad-override]
- ERROR sklearn/feature_selection/tests/test_sequential.py:110:57-88: No matching overload found for function `set.__init__` called with arguments: (ndarray[tuple[int], dtype[signedinteger[Unknown]]] | None) [no-matching-overload]
+ ERROR sklearn/feature_selection/tests/test_sequential.py:110:58-87: Argument `ndarray[tuple[int], dtype[signedinteger[Unknown]]] | None` is not assignable to parameter `iterable` with type `Iterable[Any]` in function `set.__init__` [bad-argument-type]
- ERROR sklearn/gaussian_process/_gpc.py:224:28-84: Unary `-` is not supported on `tuple[float | Unknown, Unknown]` [unsupported-operation]
+ ERROR sklearn/gaussian_process/_gpc.py:224:28-84: Unary `-` is not supported on `tuple[float | Unknown, ndarray]` [unsupported-operation]
- ERROR sklearn/gaussian_process/kernels.py:141:9-15: Class member `Hyperparameter.__eq__` overrides parent class `Hyperparameter` in an inconsistent manner [bad-override]
- ERROR sklearn/gaussian_process/kernels.py:639:9-15: Class member `CompoundKernel.__eq__` overrides parent class `Kernel` in an inconsistent manner [bad-override]
- ERROR sklearn/gaussian_process/kernels.py:646:9-22: Class member `CompoundKernel.is_stationary` overrides parent class `Kernel` in an inconsistent manner [bad-override]
- ERROR sklearn/gaussian_process/kernels.py:651:9-30: Class member `CompoundKernel.requires_vector_input` overrides parent class `Kernel` in an inconsistent manner [bad-override]
+ ERROR sklearn/gaussian_process/kernels.py:1442:7-10: Field `diag` has inconsistent types inherited from multiple base classes [inconsistent-inheritance]
... (truncated 290 lines) ...
more-itertools (https://github.com/more-itertools/more-itertools)
- ERROR more_itertools/more.py:950:21-77: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], type[map], repeat[(a: object, b: object, /) -> bool], repeat[tuple[int, ...]], permutations[tuple[int, ...]]) [no-matching-overload]
- ERROR more_itertools/more.py:1089:21-73: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], type[slice], range, range) [no-matching-overload]
+ ERROR more_itertools/more.py:950:22-25: Argument `type[map]` is not assignable to parameter `func` with type `((Any) -> Unknown, Iterable[Any], Iterable[Any]) -> @_` in function `map.__new__` [bad-argument-type]
+ ERROR more_itertools/more.py:950:27-41: Argument `repeat[(a: object, b: object, /) -> bool]` is not assignable to parameter `iterable` with type `Iterable[(Any) -> Unknown]` in function `map.__new__` [bad-argument-type]
+ ERROR more_itertools/more.py:1089:29-46: Argument `range` is not assignable to parameter `iterable` with type `Iterable[None]` in function `map.__new__` [bad-argument-type]
+ ERROR more_itertools/more.py:1089:48-72: Argument `range` is not assignable to parameter `iter2` with type `Iterable[None]` in function `map.__new__` [bad-argument-type]
aioredis (https://github.com/aio-libs/aioredis)
- ERROR aioredis/client.py:164:31-51: Cannot set item in `dict[str, str]` [unsupported-operation]
- ERROR aioredis/client.py:4622:32-49: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], list[Script], Coroutine[Unknown, Unknown, Unknown] | Unknown) [no-matching-overload]
+ ERROR aioredis/client.py:4622:42-48: Argument `Coroutine[Unknown, Unknown, Unknown] | Unknown` is not assignable to parameter `iter2` with type `Iterable[@_]` in function `zip.__new__` [bad-argument-type]
+ ERROR aioredis/client.py:4624:29-69: `Coroutine[Unknown, Unknown, Unknown] | Unknown` is not assignable to attribute `sha` with type `str` [bad-assignment]
pwndbg (https://github.com/pwndbg/pwndbg)
- ERROR pwndbg/aglib/dt.py:69:39-52: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/dt.py:69:40-51: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/dt.py:93:56-75: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/dt.py:114:32-45: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/dt.py:93:57-74: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/dt.py:114:33-44: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/heap/jemalloc.py:275:19-38: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/heap/jemalloc.py:344:39-53: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/heap/jemalloc.py:275:20-37: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/heap/jemalloc.py:344:40-52: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/heap/ptmalloc.py:269:27-51: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | Unknown | None) [no-matching-overload]
- ERROR pwndbg/aglib/heap/ptmalloc.py:455:33-93: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/heap/ptmalloc.py:269:28-50: Argument `Value | Unknown | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/heap/ptmalloc.py:455:34-92: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/heap/ptmalloc.py:463:42-465:14: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/heap/ptmalloc.py:602:27-51: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | Unknown | None) [no-matching-overload]
+ ERROR pwndbg/aglib/heap/ptmalloc.py:464:17-75: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/heap/ptmalloc.py:602:28-50: Argument `Value | Unknown | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/heap/ptmalloc.py:1399:24-45: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/heap/ptmalloc.py:1399:25-44: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/kernel/__init__.py:443:19-54: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
- ERROR pwndbg/aglib/kernel/__init__.py:552:19-56: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/aglib/kernel/__init__.py:443:20-53: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/kernel/__init__.py:552:20-55: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/kernel/__init__.py:761:16-52: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/aglib/kernel/__init__.py:761:17-51: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/kernel/macros.py:19:20-34: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/kernel/macros.py:19:21-33: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/kernel/nftables.py:96:48-76: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/kernel/nftables.py:113:64-92: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/kernel/nftables.py:118:19-47: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/kernel/nftables.py:124:15-50: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/kernel/nftables.py:148:18-46: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/kernel/nftables.py:151:16-42: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/kernel/nftables.py:172:20-48: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/kernel/nftables.py:96:49-75: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/kernel/nftables.py:113:65-91: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/kernel/nftables.py:118:20-46: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/kernel/nftables.py:124:16-49: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/kernel/nftables.py:148:19-45: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/kernel/nftables.py:151:17-41: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/kernel/nftables.py:172:21-47: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/kernel/nftables.py:271:46-61: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/kernel/nftables.py:271:47-60: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/kernel/nftables.py:391:16-45: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/aglib/kernel/nftables.py:456:16-45: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/kernel/nftables.py:391:17-44: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/aglib/kernel/nftables.py:456:17-44: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/kernel/vmmap.py:174:19-62: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/aglib/kernel/vmmap.py:174:20-61: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/nearpc.py:448:13-17: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/aglib/nearpc.py:448:14-16: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/aglib/objc.py:68:57-74: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/aglib/objc.py:68:58-73: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/color/disasm.py:137:26-62: No matching overload found for function `max` called with arguments: (Generator[int | None]) [no-matching-overload]
+ ERROR pwndbg/color/disasm.py:137:26-62: `int | None` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
- ERROR pwndbg/commands/__init__.py:702:15-30: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | str | None) [no-matching-overload]
+ ERROR pwndbg/commands/__init__.py:702:16-29: Argument `Value | str | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/__init__.py:1018:23-36: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/commands/__init__.py:1018:24-35: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/argv.py:33:48-61: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/commands/argv.py:33:49-60: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/argv.py:60:48-61: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/commands/argv.py:60:49-60: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/binder.py:360:75-89: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/commands/binder.py:367:35-49: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/commands/binder.py:371:35-49: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/commands/binder.py:373:35-49: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/commands/binder.py:375:35-49: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/commands/binder.py:390:45-63: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/commands/binder.py:394:84-98: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/commands/binder.py:360:76-88: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/binder.py:367:36-48: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/binder.py:371:36-48: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/binder.py:373:36-48: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/binder.py:375:36-48: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/binder.py:390:46-62: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/binder.py:394:85-97: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/context.py:250:16-27: Returned type `IO[Any]` is not assignable to declared return type `TextIO` [bad-return]
+ ERROR pwndbg/commands/context.py:664:27-32: Argument `str | None` is not assignable to parameter `object` with type `str` in function `list.append` [bad-argument-type]
- ERROR pwndbg/commands/flags.py:59:30-68: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/commands/flags.py:59:31-67: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/kbpf.py:163:11-21: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/commands/kbpf.py:163:12-20: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/kbpf.py:182:32-59: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
- ERROR pwndbg/commands/kbpf.py:222:11-20: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/commands/kbpf.py:182:33-58: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/kbpf.py:222:12-19: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/msr.py:63:22-57: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
- ERROR pwndbg/commands/msr.py:64:22-57: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/commands/msr.py:63:23-56: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/msr.py:64:23-56: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/rop.py:52:33-51: No matching overload found for function `bytes.__new__` called with arguments: (type[bytes], Unknown | None) [no-matching-overload]
+ ERROR pwndbg/commands/rop.py:52:34-50: Argument `Unknown | None` is not assignable to parameter `o` with type `Buffer | Iterable[SupportsIndex] | SupportsBytes | SupportsIndex` in function `bytes.__new__` [bad-argument-type]
- ERROR pwndbg/commands/start.py:28:15-41: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
- ERROR pwndbg/commands/start.py:33:11-33: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/commands/start.py:28:16-40: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/start.py:33:12-32: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/telescope.py:159:11-20: No matching overload found for function `int.__new__` called with arguments: (type[int], int | None) [no-matching-overload]
+ ERROR pwndbg/commands/telescope.py:159:12-19: Argument `int | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/commands/telescope.py:181:19-38: No matching overload found for function `range.__new__` called with arguments: (type[range], int | None, int, int) [no-matching-overload]
- ERROR pwndbg/commands/telescope.py:228:35-54: No matching overload found for function `range.__new__` called with arguments: (type[range], int | None, int, int) [no-matching-overload]
+ ERROR pwndbg/commands/telescope.py:181:20-25: Argument `int | None` is not assignable to parameter `start` with type `SupportsIndex` in function `range.__new__` [bad-argument-type]
+ ERROR pwndbg/commands/telescope.py:228:36-41: Argument `int | None` is not assignable to parameter `start` with type `SupportsIndex` in function `range.__new__` [bad-argument-type]
- ERROR pwndbg/dbg_mod/gdb/__init__.py:228:19-46: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/dbg_mod/gdb/__init__.py:228:20-45: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/dbg_mod/lldb/__init__.py:267:31-58: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/dbg_mod/lldb/__init__.py:267:32-57: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/gdblib/ptmalloc2_tracking.py:473:22-41: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/gdblib/ptmalloc2_tracking.py:473:23-40: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
- ERROR pwndbg/gdblib/ptmalloc2_tracking.py:549:22-41: No matching overload found for function `int.__new__` called with arguments: (type[int], Value | None) [no-matching-overload]
+ ERROR pwndbg/gdblib/ptmalloc2_tracking.py:549:23-40: Argument `Value | None` is not assignable to parameter `x` with type `Buffer | SupportsIndex | SupportsInt | SupportsTrunc | str` in function `int.__new__` [bad-argument-type]
setuptools (https://github.com/pypa/setuptools)
- ERROR setuptools/_distutils/command/build_ext.py:502:32-58: No matching overload found for function `zip.__new__` called with arguments: (type[zip[_T_co]], Unknown | None, list[Future[None]]) [no-matching-overload]
+ ERROR setuptools/_distutils/command/build_ext.py:502:33-48: Argument `Unknown | None` is not assignable to parameter `iter1` with type `Iterable[Unknown]` in function `zip.__new__` [bad-argument-type]
+ ERROR setuptools/_distutils/command/install.py:718:42-50: Argument `list[str]` is not assignable to parameter `iterable` with type `Iterable[PathLike[@_]]` in function `map.__new__` [bad-argument-type]
- ERROR setuptools/_distutils/command/install.py:718:23-51: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- [AnyStr: (str, bytes)](path: PathLike[AnyStr]) -> AnyStr
- [AnyOrLiteralStr: (str, bytes, LiteralString)](path: AnyOrLiteralStr) -> AnyOrLiteralStr
- ], list[str]) [no-matching-overload]
- ERROR setuptools/_distutils/dist.py:972:43-57: No matching overload found for function `Distribution.get_command_obj` called with arguments: (Command | str) [no-matching-overload]
+ ERROR setuptools/_distutils/dist.py:972:44-56: Argument `Command | str` is not assignable to parameter `command` with type `str` in function `Distribution.get_command_obj` [bad-argument-type]
+ ERROR setuptools/_distutils/extension.py:123:48-55: Argument `Iterable[PathLike[str] | str]` is not assignable to parameter `iterable` with type `Iterable[str]` in function `map.__new__` [bad-argument-type]
- ERROR setuptools/_distutils/extension.py:123:36-56: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (path: str) -> str
- (path: bytes) -> bytes
- [AnyStr: (str, bytes)](path: PathLike[AnyStr]) -> AnyStr
- ], Iterable[PathLike[str] | str]) [no-matching-overload]
+ ERROR setuptools/_distutils/filelist.py:67:52-62: Argument `list[str]` is not assignable to parameter `iterable` with type `Iterable[PathLike[@_]]` in function `map.__new__` [bad-argument-type]
- ERROR setuptools/_distutils/filelist.py:67:36-63: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- [AnyStr: (str, bytes)](p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr]
- [AnyOrLiteralStr: (str, bytes, LiteralString)](p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr]
- ], list[str]) [no-matching-overload]
+ ERROR setuptools/_distutils/tests/test_bdist_dumb.py:74:62-70: Argument `list[str]` is not assignable to parameter `iterable` with type `Iterable[PathLike[@_]]` in function `map.__new__` [bad-argument-type]
- ERROR setuptools/_distutils/tests/test_bdist_dumb.py:74:43-71: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- [AnyStr: (str, bytes)](p: PathLike[AnyStr]) -> AnyStr
- [AnyOrLiteralStr: (str, bytes, LiteralString)](p: AnyOrLiteralStr) -> AnyOrLiteralStr
- ], list[str]) [no-matching-overload]
+ ERROR setuptools/_distutils/tests/test_sdist.py:67:48-49: Argument `TextIOWrapper` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR setuptools/_distutils/tests/test_sdist.py:67:36-50: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString, chars: LiteralString | None = None, /) -> LiteralString
- (self: str, chars: str | None = None, /) -> str
- ], TextIOWrapper) [no-matching-overload]
+ ERROR setuptools/_distutils/tests/test_util.py:84:24-29: `(*path: Unknown) -> str` is not assignable to attribute `join` with type `Overload[
+ (a: LiteralString, /, *paths: LiteralString) -> LiteralString
+ (a: StrPath, /, *paths: StrPath) -> str
+ (a: BytesPath, /, *paths: BytesPath) -> bytes
+ ]` [bad-assignment]
+ ]` [bad-assignment]
+ ERROR setuptools/_distutils/tests/test_util.py:108:24-29: `(*path: Unknown) -> str` is not assignable to attribute `join` with type `Overload[
+ (a: LiteralString, /, *paths: LiteralString) -> LiteralString
+ (a: StrPath, /, *paths: StrPath) -> str
+ (a: BytesPath, /, *paths: BytesPath) -> bytes
+ ERROR setuptools/_vendor/importlib_metadata/__init__.py:660:44-61: Argument `list[str]` is not assignable to parameter `iterable` with type `Iterable[LiteralString]` in function `map.__new__` [bad-argument-type]
- ERROR setuptools/_vendor/importlib_metadata/__init__.py:660:28-62: No matching overload found for function `map.__new__` called with arguments: (type[map[_S]], Overload[
- (self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString
... (truncated 2157 lines) ...``` |
Primer Diff Classification❌ 33 regression(s) | ✅ 60 improvement(s) | ❓ 2 needs review | 95 project(s) total | +1862, -1106 errors 33 regression(s) across streamlit, ibis, build, freqtrade, aioredis, scikit-build-core, aiohttp-devtools, black, openlibrary, egglog-python, aiohttp, packaging, dulwich, rotki, Tanjun, static-frame, hydpy, pytest-robotframework, mypy, core, trio, jinja, dedupe, parso, spack, PyGithub, attrs, schema_salad, prefect, materialize, DateType, pycryptodome, altair. error kinds:
Detailed analysis❌ Regression (33)streamlit (+5, -5)
ibis (+76, -44)
build (+1)
freqtrade (+5, -1)
aioredis (+2, -2)
scikit-build-core (+6, -6)
aiohttp-devtools (+1, -1)
black (+1, -1)
openlibrary (+14, -12)
egglog-python (+1, -1)
aiohttp (+3)
packaging (+2)
dulwich (+6)
rotki (+41, -10)
Tanjun (+4, -1)
static-frame (+49, -63)
hydpy (+5, -6)
pytest-robotframework (+1, -1)
mypy (+4)
core (+46, -40)
trio (+2, -1)
jinja (+4, -3)
dedupe (+4, -2)
parso (+4, -4)
spack (+63, -38)
PyGithub (+2, -2)
attrs (+5, -4)
schema_salad (+1)
prefect (+36, -8)
materialize (+2, -2)
DateType (+8, -8)
pycryptodome (+1, -1)
altair (+18, -12)
✅ Improvement (60)beartype (+1, -2)
pandera (+1, -1)
websockets (+2, -2)
hydra-zen (+6, -5)
dd-trace-py (+8, -4)
sockeye (+6, -4)
svcs (+2, -2)
vision (+10, -8)
numpy-stl (+3)
urllib3 (+5, -2)
Expression (+1, -1)
PyWinCtl (+1)
scikit-learn (+169, -167)
more-itertools (+4, -2)
pwndbg (+57, -55)
setuptools (+23, -12)
comtypes (+8, -3)
django-stubs (+1)
apprise (+56, -53)
psycopg (+2, -2)
operator (+1, -1)
schemathesis (-1)
pip (+19, -9)
tornado (+5, -3)
mkdocs (+6, -6)
cloud-init (+18, -62)
antidote (+3, -3)
mkosi (+4, -4)
mitmproxy (+10, -18)
bokeh (+31, -20)
bandersnatch (+2, -1)
pywin32 (+1, -1)
zulip (+17, -16)
dragonchain (+4, -4)
pandas (+370, -135)
zope.interface (+7, -7)
werkzeug (+21, -21)
meson (+21, -17)
sphinx (+11, -8)
xarray (+34, -41)
discord.py (+11, -3)
kornia (+1, -1)
paasta (+3, -1)
poetry (+1)
pydantic (+3, -3)
archinstall (+1, -1)
scrapy (+14, -13)
optuna (+4, -5)
spark (+53, -50)
pytest (+1, -1)
aiortc (+3, -3)
scipy-stubs (+82)
jax (+211, -6)
cwltool (+5, -3)
pyppeteer (+2, -1)
cryptography (+1, -1)
yarl (+2, -2)
httpx-caching (+3)
scipy (+2, -3)
colour (+83, -20)
❓ Needs Review (2)pyodide (+1)
graphql-core (+1, -7)
AnalysisThe PR implements a change to how pyrefly resolves ambiguous overload calls. Previously, when multiple overloads matched and had different return types, pyrefly would fall back to New Error AnalysisThe new error is in yield from map("".join, product(allowed_chars, repeat=length))The error states: Looking at the code, Removed Errors AnalysisThe 7 removed
The PR changes show that instead of reporting "No matching overload", pyrefly now reports the specific type mismatch when there's only one overload that matches by argument count. Verdict{"spec_check": "The typing spec for overloads (https://typing.readthedocs.io/en/latest/spec/overload.html#overload) states that when multiple overloads match, the return type should be Any if the return types are not all equivalent. The PR implements a non-spec-compliant mode by default that tries to find the most general return type, but also adds a Suggested fixesSummary: The PR's attempt to be 'smarter' than the typing spec by finding the most general return type for ambiguous overloads causes 33 regressions across 35 projects, with most being pyrefly-only false positives. 1. In
2. In
3. In the code that handles attribute resolution (likely in a different file not shown in the diff), when resolving attributes on DataType objects in ibis, ensure that standard data type attributes like 'bounds', 'precision', 'scale' are properly resolved. This may require special-casing DataType attribute lookup
4. In
Was this helpful? React with 👍 or 👎 Classification by primer-classifier (1 heuristic, 94 LLM) |
…nd cross-project consistency Summary: The primer classifier has been producing inconsistent results across runs — the same primer diff can be classified as 'improvement' in one run and 'regression' in another. This was observed on real PRs like facebook#2839 (altair TypeVar iterability) and facebook#2764 (overload resolution, 60+ projects). Three changes to improve reliability: 1. **Self-critique pass (Pass 1.5)**: After Pass 1 produces reasoning, a new pass checks it for factual errors — e.g., claiming dicts are not iterable, incorrect inheritance claims, wrong TypeVar constraint analysis. This catches hallucinations before they reach the verdict pass. Tested on PR facebook#2839 where it correctly identified that both constraints of `_C` (list and TypedDict) are iterable. 2. **Majority voting on verdict (Pass 2)**: Instead of a single verdict call, makes 5 independent calls and takes the majority. This reduces non-determinism where the same reasoning could be classified either way. Vote distribution is logged for transparency. 3. **Cross-project consistency enforcement**: After classifying all projects independently, groups them by error kind and enforces majority verdict within each group. This prevents the classifier from saying 'overload resolution improved' for one project and 'overload resolution regressed' for another with the same pattern. Also upgrades the default Anthropic model from claude-opus-4-20250514 to claude-opus-4-6 for better Pass 1 reasoning quality. Differential Revision: D97571454
Summary: Pull Request resolved: #2840 I noticed when looking at the classifier output for #2764 that the "verdict" formatting needed to be fixed. Two fixes: 1. formatter.py: Add _format_reason() to render JSON reason dicts as labeled readable sections (e.g. "**Spec check:** ...", "**Reasoning:** ...") 2. llm_client.py: Ensure reason is always a string by serializing dict values, so downstream code handles it consistently. Reviewed By: grievejia Differential Revision: D97422229 fbshipit-source-id: 4aaaa4cf507ea273fdce2cfcf761801f0632d894
…nd cross-project consistency (#2841) Summary: Pull Request resolved: #2841 The primer classifier has been producing inconsistent results across runs — the same primer diff can be classified as 'improvement' in one run and 'regression' in another. This was observed on real PRs like #2839 (altair TypeVar iterability) and #2764 (overload resolution, 60+ projects). Three changes to improve reliability: 1. **Self-critique pass (Pass 1.5)**: After Pass 1 produces reasoning, a new pass checks it for factual errors — e.g., claiming dicts are not iterable, incorrect inheritance claims, wrong TypeVar constraint analysis. This catches hallucinations before they reach the verdict pass. Tested on PR #2839 where it correctly identified that both constraints of `_C` (list and TypedDict) are iterable. 2. **Majority voting on verdict (Pass 2)**: Instead of a single verdict call, makes 5 independent calls and takes the majority. This reduces non-determinism where the same reasoning could be classified either way. Vote distribution is logged for transparency. 3. **Cross-project consistency enforcement**: After classifying all projects independently, groups them by error kind and enforces majority verdict within each group. This prevents the classifier from saying 'overload resolution improved' for one project and 'overload resolution regressed' for another with the same pattern. Also upgrades the default Anthropic model from claude-opus-4-20250514 to claude-opus-4-6 for better Pass 1 reasoning quality. According to gemni, this is a big upgrade :) so I am hoping to see improvement in the quality. Reviewed By: yangdanny97 Differential Revision: D97571454 fbshipit-source-id: 356f4b150e0c4886c2743abc17699e004da997f1
Summary:
Previously, if a call to an overloaded function matched more than one overload and the return types of the matched overloads weren't all equivalent, we fell back to a return type of
Any, as the spec says to do.With this diff, we instead try to select the "most general" return type among the matched overloads, by checking if there exists a return type such that all materializations of every other return type are assignable to it. Some examples of what this means:
We now pass more of numpy and scipy-stubs' assert_type tests:
| project | assert_type failures at head | assert_type failures at previous diff | assert_type failures at current diff |
| numpy | 134 | 186 | 127 |
| scipy-stubs | 49 | 101 | 19 |
The trade-off is that we report a lot of new errors on mypy_primer projects. I investigated a bunch of them, and they're not wrong, per se, but some are arguably low-value. Examples:
The LLM classifier seems to have gotten really confused on this one XD The detailed analysis says that Pyrefly is now "stricter than the established ecosystem standard", but we pass more of numpy and scipy-stubs'
assert_typeassertions than before, meaning this diff brings us closer to the ecosystem standard. Because the PR includes the whole stack, it's also complaining about errors introduced in previous diffs.Reviewed By: grievejia
Differential Revision: D95667476