Open
Conversation
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/ext/autodoc/_legacy_class_based/_documenters.py: note: In member "should_suppress_value_header" of class "DataDocumenter":
+ sphinx/ext/autodoc/_legacy_class_based/_documenters.py:2078:44: error: Argument 1 to "reduce" has incompatible type "Callable[[_SupportsIAdd[_T_contra, _T_co], _T_contra], _T_co]"; expected "Callable[[list[Never], list[str]], list[Never]]" [arg-type]
+ sphinx/ext/autodoc/_legacy_class_based/_documenters.py:2078:44: error: Argument 1 to "reduce" has incompatible type "Callable[[_SupportsIAdd[_T_contra, _T_co], _T_contra], _T_co]"; expected "Callable[[Iterable[str], list[str]], Iterable[str]]" [arg-type]
+ sphinx/ext/autodoc/_legacy_class_based/_documenters.py: note: In member "should_suppress_value_header" of class "AttributeDocumenter":
+ sphinx/ext/autodoc/_legacy_class_based/_documenters.py:2730:48: error: Argument 1 to "reduce" has incompatible type "Callable[[_SupportsIAdd[_T_contra, _T_co], _T_contra], _T_co]"; expected "Callable[[list[Never], list[str]], list[Never]]" [arg-type]
+ sphinx/ext/autodoc/_legacy_class_based/_documenters.py:2730:48: error: Argument 1 to "reduce" has incompatible type "Callable[[_SupportsIAdd[_T_contra, _T_co], _T_contra], _T_co]"; expected "Callable[[Iterable[str], list[str]], Iterable[str]]" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/core/accessor_str.py: note: In member "get_dummies" of class "StringAccessor":
+ xarray/core/accessor_str.py:2836: error: Argument 1 to "reduce" has incompatible type overloaded function; expected "Callable[[Iterable[Any], Iterable[Any]], Iterable[Any]]" [arg-type]
Tanjun (https://github.com/FasterSpeeding/Tanjun)
+ tanjun/conversion.py:133: error: Argument 1 to "reduce" has incompatible type "Callable[[_SupportsIOr[_T_contra, _T_co], _T_contra], _T_co]"; expected "Callable[[CacheComponents, CacheComponents], CacheComponents]" [arg-type]
+ tanjun/conversion.py:156: error: Argument 1 to "reduce" has incompatible type "Callable[[_SupportsIOr[_T_contra, _T_co], _T_contra], _T_co]"; expected "Callable[[Intents, Intents], Intents]" [arg-type]
colour (https://github.com/colour-science/colour)
+ colour/utilities/array.py:547: error: Cannot call function of unknown type [operator]
+ colour/io/luts/lut.py:638: error: Cannot call function of unknown type [operator]
+ colour/io/luts/lut.py:642: error: Cannot call function of unknown type [operator]
+ colour/continuous/signal.py:1089: error: Cannot call function of unknown type [operator]
+ colour/continuous/signal.py:1093: error: Cannot call function of unknown type [operator]
+ colour/continuous/signal.py:1097: error: Cannot call function of unknown type [operator]
schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/cli/validation.py: note: In function "reduce_list":
+ src/schemathesis/cli/validation.py:184: error: Argument 1 to "reduce" has incompatible type "Callable[[_SupportsIAdd[_T_contra, _T_co], _T_contra], _T_co]"; expected "Callable[[list[Never], list[str]], list[Never]]" [arg-type]
spark (https://github.com/apache/spark)
+ python/pyspark/core/rdd.py:2155: error: Argument 2 to "fold" of "RDD" has incompatible type overloaded function; expected "Callable[[float | Literal[0], float | Literal[0]], float | Literal[0]]" [arg-type]
+ python/pyspark/core/rdd.py:2155: error: Argument 2 to "fold" of "RDD" has incompatible type overloaded function; expected "Callable[[complex | Literal[0], complex | Literal[0]], complex | Literal[0]]" [arg-type]
+ python/pyspark/core/rdd.py:2155: error: Argument 2 to "fold" of "RDD" has incompatible type overloaded function; expected "Callable[[signedinteger[_32Bit] | Literal[0], signedinteger[_32Bit] | Literal[0]], signedinteger[_32Bit] | Literal[0]]" [arg-type]
+ python/pyspark/core/rdd.py:2155: error: Argument 2 to "fold" of "RDD" has incompatible type overloaded function; expected "Callable[[signedinteger[_64Bit] | Literal[0], signedinteger[_64Bit] | Literal[0]], signedinteger[_64Bit] | Literal[0]]" [arg-type]
+ python/pyspark/core/rdd.py:2155: error: Argument 2 to "fold" of "RDD" has incompatible type overloaded function; expected "Callable[[floating[_32Bit] | Literal[0], floating[_32Bit] | Literal[0]], floating[_32Bit] | Literal[0]]" [arg-type]
+ python/pyspark/core/rdd.py:2155: error: Argument 2 to "fold" of "RDD" has incompatible type overloaded function; expected "Callable[[float64 | Literal[0], float64 | Literal[0]], float64 | Literal[0]]" [arg-type]
+ python/pyspark/core/rdd.py:2155: error: Argument 2 to "fold" of "RDD" has incompatible type overloaded function; expected "Callable[[ndarray[tuple[Any, ...], dtype[Any]] | Literal[0], ndarray[tuple[Any, ...], dtype[Any]] | Literal[0]], ndarray[tuple[Any, ...], dtype[Any]] | Literal[0]]" [arg-type]
kornia (https://github.com/kornia/kornia)
+ kornia/feature/sold2/backbones.py:79: error: Argument 1 to "reduce" has incompatible type "Callable[[MutableSequence[_T], Sequence[_T]], MutableSequence[_T]]"; expected "Callable[[list[int], list[int]], list[int]]" [arg-type]
jax (https://github.com/google/jax)
- jax/_src/pallas/pipelining/schedulers.py:241: error: Argument 1 to "reduce" has incompatible type "BinaryUfunc | Callable[[Any, Any], Any]"; expected "Callable[[bool, Array | bool], bool]" [arg-type]
+ jax/_src/pallas/pipelining/schedulers.py:241: error: Argument 1 to "reduce" has incompatible type "BinaryUfunc | overloaded function"; expected "Callable[[bool, Array | bool], bool]" [arg-type]
- jax/_src/pallas/pipelining/schedulers.py:270: error: Incompatible types in assignment (expression has type "Array | Any", variable has type "bool") [assignment]
+ jax/_src/pallas/pipelining/schedulers.py:270: error: Incompatible types in assignment (expression has type "object", variable has type "bool") [assignment]
- jax/_src/pallas/pipelining/schedulers.py:277: error: Incompatible types in assignment (expression has type "Array | Any", variable has type "bool") [assignment]
+ jax/_src/pallas/pipelining/schedulers.py:277: error: Incompatible types in assignment (expression has type "object", variable has type "bool") [assignment]
- jax/_src/pallas/pipelining/schedulers.py:303: error: Argument 1 to "reduce" has incompatible type "BinaryUfunc | Callable[[Any, Any], Any]"; expected "Callable[[list[Array | bool], Array | bool], list[Array | bool]]" [arg-type]
+ jax/_src/pallas/pipelining/schedulers.py:303: error: Argument 1 to "reduce" has incompatible type "BinaryUfunc | overloaded function"; expected "Callable[[list[Array | bool], Array | bool], list[Array | bool]]" [arg-type]
ibis (https://github.com/ibis-project/ibis)
+ ibis/util.py:268: error: Incompatible types in assignment (expression has type "overloaded function | overloaded function", variable has type overloaded function) [assignment]
+ ibis/expr/api.py:746: error: Argument 1 to "reduce" has incompatible type overloaded function; expected "Callable[[BooleanValue | bool, BooleanValue | bool], BooleanValue | bool]" [arg-type]
+ ibis/expr/api.py:766: error: Argument 1 to "reduce" has incompatible type overloaded function; expected "Callable[[BooleanValue | bool, BooleanValue | bool], BooleanValue | bool]" [arg-type]
+ ibis/backends/sql/compilers/base.py:633: error: Argument 1 to "reduce" has incompatible type overloaded function; expected "Callable[[Replace, Replace], Replace]" [arg-type]
rotki (https://github.com/rotki/rotki)
+ rotkehlchen/utils/misc.py:199: error: Argument 1 to "sub" has incompatible type "V | Any"; expected "SupportsSub[Any, Any]" [arg-type]
+ rotkehlchen/utils/misc.py:199: note: Error code "arg-type" not covered by "type: ignore" comment
pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/computation/ops.py:328: error: Need type annotation for "_binary_ops_dict" (hint: "_binary_ops_dict: dict[<type>, <type>] = ...") [var-annotated]
+ pandas/core/algorithms.py:1346: error: Incompatible types in assignment (expression has type overloaded function, variable has type overloaded function) [assignment]
+ pandas/core/indexes/datetimes.py:1385: error: Incompatible types in assignment (expression has type overloaded function, variable has type overloaded function) [assignment]
|
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.
Closes #15611.
This is a big change, my annotations may have some formatting issues, and I don't know how to add tests; however, I will not make this a draft to potentially get more suggestions.