-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Consider Any in selftype when checking overloads
#20185
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
Draft
sterliakov
wants to merge
4
commits into
python:master
Choose a base branch
from
sterliakov:feature/st-overload-any-selftype
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Consider Any in selftype when checking overloads
#20185
sterliakov
wants to merge
4
commits into
python:master
from
sterliakov:feature/st-overload-any-selftype
+109
−7
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.
|
Diff from mypy_primer, showing the effect of this PR on open source code: optuna (https://github.com/optuna/optuna)
+ optuna/_gp/search_space.py:103: error: Argument 1 to "_ScaleType" has incompatible type "ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]"; expected "int" [arg-type]
colour (https://github.com/colour-science/colour)
- colour/utilities/metrics.py:88: error: Incompatible return value type (got "floating[_16Bit] | floating[_32Bit] | float64", expected "ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]]") [return-value]
+ colour/utilities/metrics.py:88: error: Incompatible return value type (got "floating[_16Bit] | floating[_32Bit] | float64 | Any", expected "ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]]") [return-value]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "floating" matches argument type "Buffer" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: Possible overload variants:
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, int | floating[_16Bit] | unsignedinteger[_8Bit] | signedinteger[_8Bit] | numpy.bool[builtins.bool], /) -> floating[_16Bit]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, integer[Any] | floating[Any], /) -> floating[Any]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, float, /) -> floating[_16Bit]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, complex, /) -> complexfloating[Any, Any]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "floating" matches argument type "_SupportsArray[dtype[Any]]" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "floating" matches argument type "_NestedSequence[_SupportsArray[dtype[Any]]]" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "floating" matches argument type "str" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "floating" matches argument type "_NestedSequence[complex | bytes | str]" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, int | floating[_16Bit] | unsignedinteger[_8Bit] | signedinteger[_8Bit] | numpy.bool[builtins.bool] | floating[_32Bit], /) -> floating[_32Bit]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, float, /) -> floating[_32Bit]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "float64" matches argument type "Buffer" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, float | floating[_64Bit] | floating[_32Bit] | floating[_16Bit] | integer[Any] | numpy.bool[builtins.bool], /) -> float64
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, complexfloating[_64Bit, _64Bit], /) -> complex128
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def [_NBit1: NBitBase, _NBit2: NBitBase] __mul__(self, complexfloating[_NBit1, _NBit2], /) -> complexfloating[_NBit1 | _64Bit, _NBit2 | _64Bit]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: def __mul__(self, complex, /) -> float64 | complex128
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "float64" matches argument type "_SupportsArray[dtype[Any]]" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "float64" matches argument type "_NestedSequence[_SupportsArray[dtype[Any]]]" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "float64" matches argument type "str" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: error: No overload variant of "__mul__" of "float64" matches argument type "_NestedSequence[complex | bytes | str]" [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:364: note: Both left and right operands are unions
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:368: error: Unsupported operand types for / ("Buffer" and "float") [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:368: error: Unsupported operand types for / ("_SupportsArray[dtype[Any]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:368: error: Unsupported operand types for / ("_NestedSequence[_SupportsArray[dtype[Any]]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:368: error: Unsupported operand types for / ("str" and "float") [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:368: error: Unsupported operand types for / ("_NestedSequence[complex | bytes | str]" and "float") [operator]
+ colour/models/rgb/transfer_functions/rimm_romm_rgb.py:368: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/io/image.py:350: error: Incompatible return value type (got "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]", expected "ndarray[tuple[Any, ...], dtype[signedinteger[_8Bit] | signedinteger[_16Bit] | signedinteger[_32Bit] | signedinteger[_64Bit] | unsignedinteger[_8Bit] | unsignedinteger[_16Bit] | unsignedinteger[_32Bit] | unsignedinteger[_64Bit] | floating[_16Bit] | floating[_32Bit] | float64]]") [return-value]
+ colour/models/rgb/transfer_functions/sony.py:126: error: Unsupported operand types for <= ("int" and "Buffer") [operator]
+ colour/models/rgb/transfer_functions/sony.py:126: error: Unsupported operand types for <= ("int" and "_SupportsArray[dtype[Any]]") [operator]
+ colour/models/rgb/transfer_functions/sony.py:126: error: Unsupported operand types for <= ("int" and "_NestedSequence[_SupportsArray[dtype[Any]]]") [operator]
+ colour/models/rgb/transfer_functions/sony.py:126: error: Unsupported operand types for <= ("int" and "complex") [operator]
+ colour/models/rgb/transfer_functions/sony.py:126: error: Unsupported operand types for <= ("int" and "_NestedSequence[complex | bytes | str]") [operator]
+ colour/models/rgb/transfer_functions/sony.py:126: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/sony.py:126: error: Unsupported operand types for >= ("str" and "int") [operator]
+ colour/models/rgb/transfer_functions/sony.py:127: error: Unsupported operand types for + ("Buffer" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:127: error: Unsupported operand types for + ("_SupportsArray[dtype[Any]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:127: error: Unsupported operand types for + ("_NestedSequence[_SupportsArray[dtype[Any]]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:127: error: Unsupported operand types for + ("_NestedSequence[complex | bytes | str]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:127: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/sony.py:127: error: Unsupported operand types for + ("str" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:128: error: Unsupported operand types for * ("Buffer" and "int") [operator]
+ colour/models/rgb/transfer_functions/sony.py:128: error: Unsupported operand types for * ("_SupportsArray[dtype[Any]]" and "int") [operator]
+ colour/models/rgb/transfer_functions/sony.py:128: error: Unsupported operand types for * ("_NestedSequence[_SupportsArray[dtype[Any]]]" and "int") [operator]
+ colour/models/rgb/transfer_functions/sony.py:128: error: Unsupported operand types for * ("_NestedSequence[complex | bytes | str]" and "int") [operator]
+ colour/models/rgb/transfer_functions/sony.py:128: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/sony.py:128: error: Unsupported operand types for + ("str" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:128: note: Left operand is of type "int | complex | str"
+ colour/models/rgb/transfer_functions/sony.py:399: error: Unsupported operand types for <= ("float" and "Buffer") [operator]
+ colour/models/rgb/transfer_functions/sony.py:399: error: Unsupported operand types for <= ("float" and "_SupportsArray[dtype[Any]]") [operator]
+ colour/models/rgb/transfer_functions/sony.py:399: error: Unsupported operand types for <= ("float" and "_NestedSequence[_SupportsArray[dtype[Any]]]") [operator]
+ colour/models/rgb/transfer_functions/sony.py:399: error: Unsupported operand types for <= ("float" and "complex") [operator]
+ colour/models/rgb/transfer_functions/sony.py:399: error: Unsupported operand types for <= ("float" and "_NestedSequence[complex | bytes | str]") [operator]
+ colour/models/rgb/transfer_functions/sony.py:399: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/sony.py:399: error: Unsupported operand types for >= ("str" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:400: error: Unsupported operand types for + ("Buffer" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:400: error: Unsupported operand types for + ("_SupportsArray[dtype[Any]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:400: error: Unsupported operand types for + ("_NestedSequence[_SupportsArray[dtype[Any]]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:400: error: Unsupported operand types for + ("_NestedSequence[complex | bytes | str]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:400: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/sony.py:400: error: Unsupported operand types for + ("str" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:401: error: Unsupported operand types for * ("Buffer" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:401: error: Unsupported operand types for * ("_SupportsArray[dtype[Any]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:401: error: Unsupported operand types for * ("_NestedSequence[_SupportsArray[dtype[Any]]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:401: error: Unsupported operand types for * ("_NestedSequence[complex | bytes | str]" and "float") [operator]
+ colour/models/rgb/transfer_functions/sony.py:401: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/sony.py:401: error: Unsupported operand types for * ("str" and "float") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for > ("float" and "Buffer") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for > ("float" and "_SupportsArray[dtype[Any]]") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for > ("float" and "_NestedSequence[_SupportsArray[dtype[Any]]]") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for > ("float" and "complex") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for > ("float" and "_NestedSequence[complex | bytes | str]") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for < ("bytes" and "float") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for < ("str" and "float") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for * ("Buffer" and "float") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for * ("_SupportsArray[dtype[Any]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for * ("_NestedSequence[_SupportsArray[dtype[Any]]]" and "float") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for * ("_NestedSequence[complex | bytes | str]" and "float") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for * ("bytes" and "float") [operator]
+ colour/models/rgb/transfer_functions/red.py:525: error: Unsupported operand types for * ("str" and "float") [operator]
+ colour/models/rgb/transfer_functions/panasonic_v_log.py:128: error: Unsupported operand types for * ("float" and "Buffer") [operator]
+ colour/models/rgb/transfer_functions/panasonic_v_log.py:128: error: Unsupported operand types for * ("float" and "_SupportsArray[dtype[Any]]") [operator]
+ colour/models/rgb/transfer_functions/panasonic_v_log.py:128: error: Unsupported operand types for * ("float" and "_NestedSequence[_SupportsArray[dtype[Any]]]") [operator]
+ colour/models/rgb/transfer_functions/panasonic_v_log.py:128: error: Unsupported operand types for * ("float" and "str") [operator]
+ colour/models/rgb/transfer_functions/panasonic_v_log.py:128: error: Unsupported operand types for * ("float" and "_NestedSequence[complex | bytes | str]") [operator]
+ colour/models/rgb/transfer_functions/panasonic_v_log.py:128: note: Right operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/canon.py:166: error: No overload variant of "__gt__" of "ndarray" matches argument type "Buffer" [operator]
+ colour/models/rgb/transfer_functions/canon.py:166: note: Possible overload variants:
+ colour/models/rgb/transfer_functions/canon.py:166: note: def __gt__(self, _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], /) -> ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]
+ colour/models/rgb/transfer_functions/canon.py:166: note: def __gt__(self, _SupportsArray[dtype[object_]] | _NestedSequence[_SupportsArray[dtype[object_]]], /) -> ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]
+ colour/models/rgb/transfer_functions/canon.py:166: error: Unsupported operand types for > ("ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]]" and "_NestedSequence[complex | bytes | str]") [operator]
+ colour/models/rgb/transfer_functions/canon.py:166: note: Left operand is of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"
+ colour/models/rgb/transfer_functions/canon.py:166: error: Unsupported operand types for < ("str" and "ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]]") [operator]
+ colour/models/rgb/transfer_functions/canon.py:167: error: Unsupported operand type for unary - ("Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]") [operator]
+ colour/models/rgb/transfer_functions/canon.py:168: error: Unsupported operand types for * ("float" and "Buffer") [operator]
+ colour/models/rgb/transfer_functions/canon.py:168: error: Unsupported operand types for * ("float" and "_SupportsArray[dtype[Any]]") [operator]
... (truncated 118 lines) ...
zulip (https://github.com/zulip/zulip)
+ zerver/models/custom_profile_fields.py:176: error: Incompatible types (expression has type "BooleanField[bool, Any]", TypedDict item "editable_by_user" has type "bool") [typeddict-item]
+ zerver/lib/user_groups.py:735: error: Incompatible types (expression has type "BooleanField[bool, Any]", TypedDict item "deactivated" has type "bool") [typeddict-item]
+ zerver/lib/streams.py:1788: error: Incompatible types (expression has type "BooleanField[bool, Any]", TypedDict item "is_recently_active" has type "bool") [typeddict-item]
+ zerver/lib/streams.py:1799: error: Incompatible types (expression has type "PositiveIntegerField[int, Any]", TypedDict item "subscriber_count" has type "int") [typeddict-item]
+ zerver/lib/subscription_info.py:153: error: Incompatible types (expression has type "BooleanField[bool, Any]", TypedDict item "is_recently_active" has type "bool") [typeddict-item]
+ zerver/lib/subscription_info.py:168: error: Incompatible types (expression has type "PositiveIntegerField[int, Any]", TypedDict item "subscriber_count" has type "int") [typeddict-item]
+ zerver/lib/test_classes.py:2337: error: Value expression in dictionary comprehension has incompatible type "PositiveIntegerField[int, Any]"; expected type "int" [misc]
scrapy (https://github.com/scrapy/scrapy)
+ scrapy/utils/conf.py:133: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "dict[Any, Any] | list[Any] | None"; expected "None" [arg-type]
+ scrapy/exporters.py:136: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "int | None"; expected "None" [arg-type]
core (https://github.com/home-assistant/core)
+ homeassistant/components/light/__init__.py:828: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "int | None"; expected "None" [arg-type]
aioredis (https://github.com/aio-libs/aioredis)
- aioredis/client.py:4152: error: Unused "type: ignore" comment [unused-ignore]
pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/util/hashing.py:350: error: Unused "type: ignore" comment [unused-ignore]
+ pandas/io/formats/format.py:1607: error: Item "Sequence[float]" of "ndarray[tuple[Any, ...], dtype[Any]] | Sequence[float]" has no attribute "round" [union-attr]
+ pandas/io/formats/format.py:1618: error: No overload variant of "__getitem__" of "Sequence" matches argument type "ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]" [call-overload]
+ pandas/io/formats/format.py:1618: note: Possible overload variants:
+ pandas/io/formats/format.py:1618: note: def __getitem__(self, int, /) -> float
+ pandas/io/formats/format.py:1618: note: def __getitem__(self, slice[Any, Any, Any], /) -> Sequence[float]
+ pandas/io/formats/format.py:1620: error: No overload variant of "__getitem__" of "Sequence" matches argument type "ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]" [call-overload]
+ pandas/io/formats/format.py:1620: note: Possible overload variants:
+ pandas/io/formats/format.py:1620: note: def __getitem__(self, int, /) -> float
+ pandas/io/formats/format.py:1620: note: def __getitem__(self, slice[Any, Any, Any], /) -> Sequence[float]
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_timefuncs.py:1660: error: Expression is of type "Series[Any]", not "Series[Timestamp]" [assert-type]
+ tests/test_frame.py:1089: error: Expression is of type "Any", not "ndarray[tuple[Any, ...], dtype[Any]]" [assert-type]
+ tests/series/test_agg.py:14: error: Expression is of type "Any", not "float" [assert-type]
+ tests/series/test_agg.py:15: error: Expression is of type "Any", not "float" [assert-type]
+ tests/series/test_agg.py:16: error: Expression is of type "Any", not "float" [assert-type]
+ tests/series/arithmetic/test_truediv.py:99: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_truediv.py:102: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_sub.py:235: error: Expression is of type "Any", not "Series[Timedelta]" [assert-type]
+ tests/series/arithmetic/test_mul.py:78: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_mul.py:79: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_mul.py:80: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_mul.py:81: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_add.py:83: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_add.py:84: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_add.py:85: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/series/arithmetic/test_add.py:86: error: Expression is of type "Any", not "Series[Any]" [assert-type]
+ tests/scalars/test_scalars.py:1814: error: Expression is of type "Any", not "PeriodIndex" [assert-type]
+ tests/indexes/arithmetic/test_truediv.py:59: error: Expression is of type "Any", not "Index[Any]" [assert-type]
+ tests/indexes/arithmetic/test_mul.py:58: error: Expression is of type "Any", not "Index[Any]" [assert-type]
+ tests/indexes/arithmetic/test_mul.py:60: error: Expression is of type "Any", not "Index[Any]" [assert-type]
+ tests/indexes/arithmetic/test_mul.py:61: error: Expression is of type "Any", not "Index[Any]" [assert-type]
+ tests/indexes/arithmetic/test_add.py:57: error: Expression is of type "Any", not "Index[Any]" [assert-type]
+ tests/indexes/arithmetic/test_add.py:58: error: Expression is of type "Any", not "Index[Any]" [assert-type]
+ tests/indexes/arithmetic/test_add.py:59: error: Expression is of type "Any", not "Index[Any]" [assert-type]
+ tests/indexes/arithmetic/test_add.py:60: error: Expression is of type "Any", not "Index[Any]" [assert-type]
+ tests/indexes/arithmetic/test_add.py:111: error: Expression is of type "Any", not "Never" [assert-type]
+ tests/series/test_series.py:1992: error: Expression is of type "ndarray[Any, Any]", not "ndarray[tuple[int], dtype[Any]]" [assert-type]
+ tests/series/test_series.py:3516: error: Expression is of type "Any", not "Series[float]" [assert-type]
pandera (https://github.com/pandera-dev/pandera)
+ pandera/api/dataframe/model_components.py:310: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "str | None"; expected "None" [arg-type]
+ pandera/api/dataframe/model_components.py:337: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "str | None"; expected "None" [arg-type]
+ pandera/api/dataframe/model_components.py:358: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "str | None"; expected "None" [arg-type]
+ pandera/api/dataframe/model_components.py:374: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "str | None"; expected "None" [arg-type]
websockets (https://github.com/aaugustin/websockets)
+ src/websockets/asyncio/server.py:769: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "float | None"; expected "None" [arg-type]
+ src/websockets/asyncio/server.py:771: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "float | None"; expected "None" [arg-type]
+ src/websockets/sync/client.py:326: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "float | None"; expected "None" [arg-type]
+ src/websockets/sync/client.py:469: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "float | None"; expected "None" [arg-type]
+ src/websockets/sync/client.py:526: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "float | None"; expected "None" [arg-type]
pip (https://github.com/pypa/pip)
+ src/pip/_internal/network/session.py:523: error: Argument 2 to "setdefault" of "MutableMapping" has incompatible type "int | None"; expected "None" [arg-type]
static-frame (https://github.com/static-frame/static-frame)
+ static_frame/core/rank.py:106: error: Unused "type: ignore" comment [unused-ignore]
+ static_frame/core/frame.py:10099: error: Argument 2 to "_extract" of "Frame" has incompatible type "int | integer[Any] | ndarray[Any, Any] | list[int] | slice[Any, Any, Any] | None"; expected "int | integer[Any]" [arg-type]
+ static_frame/core/frame.py:10267: error: Argument 2 to "_extract" of "Frame" has incompatible type "int | integer[Any] | ndarray[Any, Any] | list[int] | slice[Any, Any, Any] | None"; expected "int | integer[Any]" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/tests/test_typed_ops.py:28: error: Unused "type: ignore" comment [unused-ignore]
+ xarray/tests/test_typed_ops.py:79: error: Unused "type: ignore" comment [unused-ignore]
freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/optimize/backtesting.py:1533: error: Incompatible return value type (got "list[list[Any]]", expected "list[tuple[Any, ...]] | None") [return-value]
|
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.
See the added testcase. If the overload result is ambiguous due to
Anyin selftype, mypy should not arbitrary pick the first overload. Let's see what primer says first.