Closed
Conversation
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: pandera (https://github.com/pandera-dev/pandera)
+ pandera/strategies.py:565: error: Cannot call function of unknown type [operator]
+ pandera/checks.py:731: error: Cannot call function of unknown type [operator]
ibis (https://github.com/ibis-project/ibis)
+ ibis/backends/base/sql/registry/window.py:85: error: Cannot call function of unknown type
xarray (https://github.com/pydata/xarray)
+ xarray/core/accessor_str.py:2509: error: Argument 1 to "reduce" has incompatible type overloaded function; expected "Callable[[Iterable[Any], Iterable[Any]], Iterable[Any]]" [arg-type]
rotki (https://github.com/rotki/rotki)
+ rotkehlchen/chain/ethereum/modules/balancer/balancer.py:151: error: No overload variant of "map" matches argument types "function", "List[AssetAmount]", "List[AssetAmount]"
+ rotkehlchen/chain/ethereum/modules/balancer/balancer.py:151: note: Possible overload variant:
+ rotkehlchen/chain/ethereum/modules/balancer/balancer.py:151: note: def [_S, _T1, _T2] __init__(self, Callable[[_T1, _T2], _S], Iterable[_T1], Iterable[_T2]) -> map[_S]
+ rotkehlchen/chain/ethereum/modules/balancer/balancer.py:151: note: <5 more non-matching overloads not shown>
+ rotkehlchen/chain/ethereum/modules/balancer/balancer.py:154: error: Cannot call function of unknown type
+ tools/data_faker/data_faker/statistics.py:154: error: Incompatible types in assignment (expression has type overloaded function, variable has type overloaded function)
Tanjun (https://github.com/FasterSpeeding/Tanjun)
+ tanjun/conversion.py:603: error: Argument 1 to "index" has incompatible type "float"; expected "SupportsIndex"
+ tanjun/conversion.py:654: error: Argument 1 to "index" has incompatible type "float"; expected "SupportsIndex"
pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/computation/ops.py:413: error: Cannot call function of unknown type [operator]
+ pandas/core/computation/ops.py:455: error: Cannot call function of unknown type [operator]
+ pandas/core/computation/ops.py:583: error: Cannot call function of unknown type [operator]
+ pandas/core/algorithms.py:1585: error: Incompatible types in assignment (expression has type overloaded function, variable has type overloaded function) [assignment]
+ pandas/core/indexes/base.py:3854: error: Cannot call function of unknown type [operator]
+ pandas/core/arrays/interval.py:1281: error: Cannot call function of unknown type [operator]
+ pandas/core/indexes/datetimes.py:854: error: Incompatible types in assignment (expression has type overloaded function, variable has type overloaded function) [assignment]
+ pandas/core/indexes/datetimes.py:856: error: Incompatible types in assignment (expression has type overloaded function, variable has type overloaded function) [assignment]
+ pandas/core/indexes/datetimes.py:859: error: Incompatible types in assignment (expression has type overloaded function, variable has type overloaded function) [assignment]
+ pandas/core/indexes/datetimes.py:864: error: Incompatible types in assignment (expression has type overloaded function, variable has type overloaded function) [assignment]
+ pandas/core/indexes/interval.py:630: error: Cannot call function of unknown type [operator]
+ pandas/core/generic.py:1503: error: Argument 1 to "inv" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "_SupportsInv[<nothing>]" [arg-type]
+ pandas/core/generic.py:1505: error: Argument 1 to "neg" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "_SupportsNeg[ndarray[Any, dtype[Any]]]" [arg-type]
+ pandas/core/generic.py:1517: error: Argument 1 to "pos" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "_SupportsPos[ndarray[Any, dtype[Any]]]" [arg-type]
+ pandas/io/formats/style.py:3490: error: Incompatible types in assignment (expression has type "Tuple[overloaded function, overloaded function]", variable has type "Tuple[overloaded function, overloaded function]") [assignment]
+ pandas/io/formats/style.py:3492: error: Incompatible types in assignment (expression has type "Tuple[overloaded function, overloaded function]", variable has type "Tuple[overloaded function, overloaded function]") [assignment]
+ pandas/io/formats/style.py:3494: error: Incompatible types in assignment (expression has type "Tuple[overloaded function, overloaded function]", variable has type "Tuple[overloaded function, overloaded function]") [assignment]
+ pandas/io/formats/style.py:3511: error: Unsupported left operand type for & ("object") [operator]
|
Member
|
Nice, the Tanjun one found a real bug (or wrong annotation). Much of the other mypy-primer output looks like false positives though. |
Member
Author
Yah, I kinda expected I'd get quite a few 🙂 but wanted to push it all in one go to see what would happen. Probably won't have a chance to look through the primer output until tomorrow. |
This was referenced Nov 30, 2021
Closed
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.
_operator.pyicurrently has a large number of functions that are only annotated withAny. I believe we can do much better than that.