Fully type `_operator` module by jonathandung · Pull Request #15612 · python/typeshed

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 overloaded function; 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 overloaded function; 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 overloaded function; 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 overloaded function; 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]

colour (https://github.com/colour-science/colour)
+ colour/io/luts/lut.py:642: 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 overloaded function; expected "Callable[[list[Never], list[str]], list[Never]]"  [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]

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]