-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Handle more cases in any_constraints
#19695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
sterliakov
wants to merge
7
commits into
python:master
from
sterliakov:bugfix/gh-19492-or-constraint
Closed
Handle more cases in any_constraints
#19695
sterliakov
wants to merge
7
commits into
python:master
from
sterliakov:bugfix/gh-19492-or-constraint
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…infer a union subset
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: optuna (https://github.com/optuna/optuna)
+ optuna/importance/_fanova/_tree.py:160: error: Incompatible types in assignment (expression has type "list[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | SupportsFloat | SupportsIndex | str | bytes | _NestedSequence[SupportsFloat | SupportsIndex | str | bytes | None] | Any | None]", target has type "SupportsFloat | SupportsIndex | str | bytes | _NestedSequence[SupportsFloat | SupportsIndex | str | bytes | None] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | float | _NestedSequence[float] | None") [assignment]
+ optuna/importance/_fanova/_tree.py:179: error: Incompatible types in assignment (expression has type "list[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | SupportsFloat | SupportsIndex | str | bytes | _NestedSequence[SupportsFloat | SupportsIndex | str | bytes | None] | Any | None]", target has type "SupportsFloat | SupportsIndex | str | bytes | _NestedSequence[SupportsFloat | SupportsIndex | str | bytes | None] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | float | _NestedSequence[float] | None") [assignment]
+ optuna/samplers/_tpe/parzen_estimator.py:64: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ optuna/samplers/_tpe/parzen_estimator.py:271: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ optuna/samplers/_tpe/parzen_estimator.py:272: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ optuna/samplers/_brute_force.py:102: error: Argument 1 to "choice" of "RandomState" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ optuna/_gp/acqf.py:258: error: Argument 1 to "mean" has incompatible type "list[_SupportsArray[dtype[object_]] | _NestedSequence[_SupportsArray[dtype[object_]]] | complex | _NestedSequence[complex] | _SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]] | complex | _NestedSequence[complex] | _SupportsArray[dtype[object_]] | _NestedSequence[_SupportsArray[dtype[object_]]]" [arg-type]
+ optuna/_gp/acqf.py:309: error: Argument 1 to "mean" has incompatible type "list[_SupportsArray[dtype[object_]] | _NestedSequence[_SupportsArray[dtype[object_]]] | complex | _NestedSequence[complex] | _SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]] | complex | _NestedSequence[complex] | _SupportsArray[dtype[object_]] | _NestedSequence[_SupportsArray[dtype[object_]]]" [arg-type]
+ tests/samplers_tests/test_nsgaiii.py:326: error: Argument 1 to "lexsort" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ optuna/importance/_ped_anova/scott_parzen_estimator.py:76: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ optuna/importance/_ped_anova/scott_parzen_estimator.py:77: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ optuna/importance/_ped_anova/scott_parzen_estimator.py:107: error: Argument 1 to "__call__" of "_UFunc_Nin1_Nout1" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ tests/samplers_tests/test_samplers.py:385: error: Argument 1 to "all" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None" [arg-type]
+ tests/samplers_tests/test_samplers.py:428: error: Argument 1 to "all" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None" [arg-type]
+ tests/samplers_tests/test_nsgaii.py:834: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ tests/samplers_tests/test_nsgaii.py:881: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ tests/samplers_tests/test_nsgaii.py:929: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ optuna/terminator/improvement/emmr.py:350: error: Invalid index type "list[int | _NestedSequence[int] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | Any]" for "ndarray[tuple[Any, ...], dtype[Any]]"; expected type "SupportsIndex | slice[Any, Any, Any] | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int] | None | tuple[SupportsIndex | slice[Any, Any, Any] | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int] | None, ...]" [index]
+ tests/storages_tests/test_with_server.py:81: error: Argument 2 to "isclose" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ tests/storages_tests/test_with_server.py:97: error: Argument 1 to "isclose" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ tests/storages_tests/test_with_server.py:98: error: Argument 2 to "isclose" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
colour (https://github.com/colour-science/colour)
- colour/hints/__init__.py:638: error: Argument 1 to "arraylike" has incompatible type "list[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
- colour/hints/__init__.py:640: error: Argument 1 to "arraylike" has incompatible type "list[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
- colour/hints/__init__.py:649: error: Argument 1 to "number_or_arraylike" has incompatible type "list[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
- colour/hints/__init__.py:651: error: Argument 1 to "number_or_arraylike" has incompatible type "list[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
- colour/hints/__init__.py:660: error: Argument 1 to "arraylike" has incompatible type "list[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
- colour/hints/__init__.py:662: error: Argument 1 to "arraylike" has incompatible type "list[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/hints/__init__.py:628: error: Incompatible types in assignment (expression has type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]", variable has type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]") [assignment]
+ colour/hints/__init__.py:638: error: Argument 1 to "arraylike" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/hints/__init__.py:640: error: Argument 1 to "arraylike" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/hints/__init__.py:649: error: Argument 1 to "number_or_arraylike" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/hints/__init__.py:651: error: Argument 1 to "number_or_arraylike" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/hints/__init__.py:660: error: Argument 1 to "arraylike" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/hints/__init__.py:662: error: Argument 1 to "arraylike" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/utilities/array.py:594: error: Incompatible types in assignment (expression has type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]", variable has type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | KeysView[Any] | ValuesView[Any]") [assignment]
+ colour/algebra/prng.py:102: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/algebra/interpolation.py:507: error: No overload variant of "pad" matches argument types "ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]]", "ndarray[tuple[Any, ...], dtype[signedinteger[_8Bit] | signedinteger[_16Bit] | signedinteger[_32Bit] | signedinteger[_64Bit] | unsignedinteger[_8Bit] | unsignedinteger[_16Bit] | unsignedinteger[_32Bit] | unsignedinteger[_64Bit]]]", "str", "tuple[Any, Any]" [call-overload]
+ colour/algebra/interpolation.py:507: note: Possible overload variants:
+ colour/algebra/interpolation.py:507: note: def [_ScalarT: generic[Any]] pad(array: _SupportsArray[dtype[_ScalarT]] | _NestedSequence[_SupportsArray[dtype[_ScalarT]]], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int], mode: Literal['constant', 'edge', 'linear_ramp', 'maximum', 'mean', 'median', 'minimum', 'reflect', 'symmetric', 'wrap', 'empty'] = ..., *, stat_length: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | None = ..., constant_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., end_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., reflect_type: Literal['odd', 'even'] = ...) -> ndarray[tuple[Any, ...], dtype[_ScalarT]]
+ colour/algebra/interpolation.py:507: note: def pad(array: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int], mode: Literal['constant', 'edge', 'linear_ramp', 'maximum', 'mean', 'median', 'minimum', 'reflect', 'symmetric', 'wrap', 'empty'] = ..., *, stat_length: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | None = ..., constant_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., end_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., reflect_type: Literal['odd', 'even'] = ...) -> ndarray[tuple[Any, ...], dtype[Any]]
+ colour/algebra/interpolation.py:507: note: def [_ScalarT: generic[Any]] pad(array: _SupportsArray[dtype[_ScalarT]] | _NestedSequence[_SupportsArray[dtype[_ScalarT]]], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int], mode: _ModeFunc, **kwargs: Any) -> ndarray[tuple[Any, ...], dtype[_ScalarT]]
+ colour/algebra/interpolation.py:507: note: def pad(array: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int], mode: _ModeFunc, **kwargs: Any) -> ndarray[tuple[Any, ...], dtype[Any]]
+ colour/algebra/interpolation.py:509: error: Argument 1 to "as_int_array" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/algebra/interpolation.py:1202: error: Argument 1 to "as_array" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | KeysView[Any] | ValuesView[Any]" [arg-type]
+ colour/algebra/interpolation.py:1204: error: Argument 1 to "as_array" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | KeysView[Any] | ValuesView[Any]" [arg-type]
+ colour/algebra/interpolation.py:1263: error: Argument 1 to "as_array" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | KeysView[Any] | ValuesView[Any]" [arg-type]
+ colour/algebra/interpolation.py:1265: error: Argument 1 to "as_array" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | KeysView[Any] | ValuesView[Any]" [arg-type]
+ colour/algebra/coordinates/transformations.py:104: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/algebra/coordinates/transformations.py:143: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/algebra/coordinates/transformations.py:180: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/algebra/coordinates/transformations.py:217: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/algebra/coordinates/transformations.py:253: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/algebra/coordinates/transformations.py:290: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/temperature/krystek1985.py:114: error: Argument 1 to "as_float_array" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/temperature/krystek1985.py:170: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/temperature/kang2002.py:109: error: Argument 1 to "as_float_array" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/temperature/kang2002.py:186: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ colour/models/yrg.py:124: error: Argument 1 to "tstack" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
... (truncated 420 lines) ...
hydpy (https://github.com/hydpy-dev/hydpy)
+ hydpy/models/lland_knauf_ic.py:1892: error: Argument 2 to "isin" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ hydpy/models/lland_knauf_ic.py:1895: error: Argument 2 to "isin" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ hydpy/models/lland_knauf_ic.py:1897: error: Argument 2 to "isin" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ hydpy/models/lland_knauf.py:2131: error: Argument 2 to "isin" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ hydpy/models/lland_knauf.py:2134: error: Argument 2 to "isin" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ hydpy/models/lland_dd.py:2506: error: Argument 2 to "isin" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/arrays/sparse/accessor.py:465: error: Incompatible return value type (got "timedelta64[timedelta | int | None]", expected "float") [return-value]
+ pandas/io/pytables.py:3626: error: Incompatible return value type (got "signedinteger[_32Bit | _64Bit]", expected "int") [return-value]
+ pandas/io/pytables.py:3626: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ pandas/core/indexes/multi.py:1253: error: Argument 1 to "__call__" of "_UFunc_Nin1_Nout1" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ pandas/core/indexers/objects.py:491: error: Argument 2 to "append" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ pandas/core/indexers/objects.py:491: note: Error code "arg-type" not covered by "type: ignore" comment
+ pandas/_testing/asserters.py:816: error: Argument 1 to "all" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None" [arg-type]
+ pandas/_testing/asserters.py:816: note: Error code "arg-type" not covered by "type: ignore" comment
+ pandas/_testing/asserters.py:824: error: Argument 1 to "all" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None" [arg-type]
+ pandas/_testing/asserters.py:824: note: Error code "arg-type" not covered by "type: ignore" comment
+ pandas/tests/interchange/test_impl.py:124: error: Argument 1 to "choice" of "Generator" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ pandas/tests/frame/test_stack_unstack.py:1796: error: Argument 2 to "repeat" has incompatible type "list[int | _NestedSequence[int] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int]" [arg-type]
+ pandas/plotting/_matplotlib/converter.py:594: error: Invalid index type "list[int | _NestedSequence[int] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | Any]" for "ndarray[tuple[int], dtype[Any]]"; expected type "SupportsIndex | slice[Any, Any, Any] | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int] | None | tuple[SupportsIndex | slice[Any, Any, Any] | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int] | None, ...]" [index]
+ pandas/plotting/_matplotlib/boxplot.py:373: error: Need type annotation for "result" [var-annotated]
+ pandas/plotting/_matplotlib/boxplot.py:373: error: Argument 1 to "take" has incompatible type "list[str | Sequence[float]]"; expected "_SupportsArray[dtype[Never]] | _NestedSequence[_SupportsArray[dtype[Never]]]" [arg-type]
+ pandas/plotting/_matplotlib/boxplot.py:373: error: Argument 2 to "take" has incompatible type "list[int | _NestedSequence[int] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int]" [arg-type]
arviz (https://github.com/arviz-devs/arviz)
+ examples/matplotlib/mpl_plot_kde_2d_hdi.py:15: error: Argument 1 to "multivariate_normal" of "Generator" has incompatible type "list[float | _NestedSequence[float] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | float | _NestedSequence[float]" [arg-type]
+ examples/matplotlib/mpl_plot_kde_2d_hdi.py:15: error: Argument 2 to "multivariate_normal" of "Generator" has incompatible type "list[float | _NestedSequence[float] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | float | _NestedSequence[float]" [arg-type]
+ examples/bokeh/bokeh_plot_kde_2d_hdi.py:11: error: Argument 1 to "multivariate_normal" of "Generator" has incompatible type "list[float | _NestedSequence[float] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | float | _NestedSequence[float]" [arg-type]
+ examples/bokeh/bokeh_plot_kde_2d_hdi.py:11: error: Argument 2 to "multivariate_normal" of "Generator" has incompatible type "list[float | _NestedSequence[float] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | float | _NestedSequence[float]" [arg-type]
jax (https://github.com/google/jax)
+ jax/_src/mesh_utils.py:518: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/_src/mesh_utils.py:521: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/_src/mesh_utils.py:525: error: Incompatible return value type (got "numpy.bool[builtins.bool]", expected "builtins.bool") [return-value]
+ jax/_src/mesh_utils.py:548: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/_src/mesh_utils.py:551: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/_src/mesh_utils.py:555: error: Incompatible return value type (got "numpy.bool[builtins.bool]", expected "builtins.bool") [return-value]
+ jax/_src/lax/convolution.py:936: error: Argument 2 to "__call__" of "_UFunc_Nin2_Nout1" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ jax/_src/shard_map.py:836: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/mosaic/gpu/utils.py:596: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/sparse/bcoo.py:563: error: Invalid index type "list[int | _NestedSequence[int] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | Any]" for "ndarray[tuple[Any, ...], dtype[Any]]"; expected type "SupportsIndex | slice[Any, Any, Any] | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int] | None | tuple[SupportsIndex | slice[Any, Any, Any] | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int] | None, ...]" [index]
+ jax/experimental/sparse/bcoo.py:564: error: Invalid index type "list[int | _NestedSequence[int] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | Any]" for "ndarray[tuple[Any, ...], dtype[Any]]"; expected type "SupportsIndex | slice[Any, Any, Any] | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int] | None | tuple[SupportsIndex | slice[Any, Any, Any] | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any]]]] | int | _NestedSequence[int] | None, ...]" [index]
+ jax/experimental/roofline/rooflines.py:220: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/roofline/rooflines.py:221: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/roofline/rooflines.py:452: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/roofline/rooflines.py:475: error: Incompatible types in assignment (expression has type "floating[_32Bit | _64Bit]", variable has type "int") [assignment]
+ jax/experimental/roofline/rooflines.py:475: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/roofline/rooflines.py:668: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/roofline/rooflines.py:759: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/roofline/rooflines.py:761: error: Argument 1 to "prod" has incompatible type "list[builtins.bool | _NestedSequence[builtins.bool] | _SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]]]] | builtins.bool | _NestedSequence[builtins.bool]" [arg-type]
+ jax/experimental/mosaic/gpu/fragmented_array.py:3085: error: Argument 1 to "dot" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
+ jax/experimental/jax2tf/tests/models_test_main.py:160: error: Argument "a" has incompatible type "list[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | Any]"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type]
scipy (https://github.com/scipy/scipy)
+ scipy/io/matlab/tests/test_mio.py:64: error: Incompatible types in assignment (expression has type "list[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | SupportsFloat | SupportsIndex | str | bytes | _NestedSequence[SupportsFloat | SupportsIndex | str | bytes | None] | Any | None]", target has type "SupportsFloat | SupportsIndex | str | bytes | _NestedSequence[SupportsFloat | SupportsIndex | str | bytes | None] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | float | _NestedSequence[float] | None") [assignment]
+ scipy/io/matlab/tests/test_mio.py:65: error: Incompatible types in assignment (expression has type "list[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | SupportsFloat | SupportsIndex | str | bytes | _NestedSequence[SupportsFloat | SupportsIndex | str | bytes | None] | Any | None]", target has type "SupportsFloat | SupportsIndex | str | bytes | _NestedSequence[SupportsFloat | SupportsIndex | str | bytes | None] | _SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | integer[Any] | floating[Any]]]] | float | _NestedSequence[float] | None") [assignment]
+ scipy/stats/_sensitivity_analysis.py:146: error: Argument 1 to "var" has incompatible type "list[_SupportsArray[dtype[object_]] | _NestedSequence[_SupportsArray[dtype[object_]]] | complex | _NestedSequence[complex] | _SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]] | Any]"; expected "_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]] | complex | _NestedSequence[complex] | _SupportsArray[dtype[object_]] | _NestedSequence[_SupportsArray[dtype[object_]]]" [arg-type]
... (truncated 142 lines) ...``` |
ilevkivskyi
pushed a commit
that referenced
this pull request
Aug 28, 2025
…19748) Fixes #19492. In #19695 I tried to add another set of heuristics to `any_constraints`, but can't get that working: trying to join/meet all similar constraints together breaks inference in other cases, and only doing that for Any would be somewhat non-trivial. This PR reverts behaviour introduced in #19492 when LHS of the expression contains `Any`. Outer context is still included in all other cases, and this seems to strike a good balance.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #19492. When all options have the same structure, we can meaningfully OR such constraints as meets/joins of upper/lower bounds for all variables separately. Fortunately, that's exactly what solver will do later, so we can just add all constraints together.