Consider Any in selftype when checking overloads#20185
Draft
sterliakov wants to merge 6 commits intopython:masterfrom
Draft
Consider Any in selftype when checking overloads#20185sterliakov wants to merge 6 commits intopython:masterfrom
Any in selftype when checking overloads#20185sterliakov wants to merge 6 commits intopython:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…rloads will pick the first overload again...
This comment has been minimized.
This comment has been minimized.
e7b431b to
75e4e22
Compare
This comment has been minimized.
This comment has been minimized.
e096bf9 to
75e4e22
Compare
Collaborator
Author
|
Okay, this is worse than I hoped... The new errors are correct but rather unhelpful - numpy stubs apparently rely on this behaviour... For example, the following: x: np.ndarray
reveal_type(x)
reveal_type(x * 100)only reveals and the "compare erased types" logic does not kick in because there are |
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: colour (https://github.com/colour-science/colour)
+ 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]
+ colour/models/rgb/transfer_functions/canon.py:168: error: Unsupported operand types for * ("float" and "_NestedSequence[_SupportsArray[dtype[Any]]]") [operator]
+ colour/models/rgb/transfer_functions/canon.py:168: error: Unsupported operand types for * ("float" and "str") [operator]
+ colour/models/rgb/transfer_functions/canon.py:168: error: Unsupported operand types for * ("float" and "_NestedSequence[complex | bytes | str]") [operator]
... (truncated 113 lines) ...
steam.py (https://github.com/Gobot1234/steam.py)
- steam/ext/commands/help.py:35: error: Redundant cast to "CommandKwargs[Any]" [redundant-cast]
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)
- tests/pandas/test_dtypes.py:343: error: Need type annotation for "series" [var-annotated]
+ tests/pandas/test_dtypes.py:345: error: Unused "type: ignore" comment [unused-ignore]
static-frame (https://github.com/static-frame/static-frame)
+ static_frame/core/rank.py:106: error: Unused "type: ignore" comment [unused-ignore]
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]
- freqtrade/plugins/pairlist/VolatilityFilter.py:156: error: "ndarray[tuple[Any, ...], dtype[Any]]" has no attribute "fillna" [attr-defined]
- freqtrade/plugins/pairlist/VolatilityFilter.py:158: error: "ndarray[tuple[Any, ...], dtype[Any]]" has no attribute "rolling" [attr-defined]
|
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
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.