Skip to content
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

Sync typeshed #11712

Closed
wants to merge 1 commit into from
Closed

Sync typeshed #11712

wants to merge 1 commit into from

Conversation

hauntsaninja
Copy link
Collaborator

As per #11700, do not merge. Using PR to see if mypy primer finds any especially valuable typeshed changes to cherry pick

Source commit:
python/typeshed@53eae77

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sympy (https://github.com/sympy/sympy)
- sympy/tensor/array/expressions/conv_array_to_matrix.py:288: note:     def __getitem__(self, int) -> Basic
+ sympy/tensor/array/expressions/conv_array_to_matrix.py:288: note:     def __getitem__(self, SupportsIndex) -> Basic
- sympy/tensor/array/expressions/conv_array_to_matrix.py:290: note:     def __getitem__(self, int) -> Basic
+ sympy/tensor/array/expressions/conv_array_to_matrix.py:290: note:     def __getitem__(self, SupportsIndex) -> Basic

ibis (https://github.com/ibis-project/ibis)
- ibis/backends/clickhouse/registry.py:712: error: Argument 1 to "update" of "dict" has incompatible type "Dict[Type[ValueOp], Any]"; expected "Mapping[Type[Node], Any]"
+ ibis/backends/clickhouse/registry.py:712: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[Type[ValueOp], Any]"; expected "Mapping[Type[Node], Any]"
- ibis/backends/clickhouse/registry.py:713: error: Argument 1 to "update" of "dict" has incompatible type "Dict[AnnotableMeta, Callable[[Any, Any, VarArg(Any)], Any]]"; expected "Mapping[Type[Node], Any]"
+ ibis/backends/clickhouse/registry.py:713: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[AnnotableMeta, Callable[[Any, Any, VarArg(Any)], Any]]"; expected "Mapping[Type[Node], Any]"
- ibis/backends/clickhouse/registry.py:714: error: Argument 1 to "update" of "dict" has incompatible type "Dict[Type[UnaryOp], Callable[[Any, Any], Any]]"; expected "Mapping[Type[Node], Any]"
+ ibis/backends/clickhouse/registry.py:714: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[Type[UnaryOp], Callable[[Any, Any], Any]]"; expected "Mapping[Type[Node], Any]"
- ibis/backends/clickhouse/registry.py:715: error: Argument 1 to "update" of "dict" has incompatible type "Dict[AnnotableMeta, Any]"; expected "Mapping[Type[Node], Any]"
+ ibis/backends/clickhouse/registry.py:715: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[AnnotableMeta, Any]"; expected "Mapping[Type[Node], Any]"
- ibis/backends/base/sql/registry/main.py:361: error: Argument 1 to "update" of "dict" has incompatible type "Dict[AnnotableMeta, Any]"; expected "Mapping[Type[Node], Any]"
+ ibis/backends/base/sql/registry/main.py:361: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[AnnotableMeta, Any]"; expected "Mapping[Type[Node], Any]"
- ibis/backends/impala/compiler.py:25: error: Argument 1 to "update" of "dict" has incompatible type "Dict[AnnotableMeta, Any]"; expected "Mapping[Type[Node], Any]"
+ ibis/backends/impala/compiler.py:25: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[AnnotableMeta, Any]"; expected "Mapping[Type[Node], Any]"

aioredis (https://github.com/aio-libs/aioredis)
- aioredis/client.py:4136: error: Argument 1 to "update" of "dict" has incompatible type "Dict[Union[bytes, str], Optional[Any]]"; expected "Mapping[Union[bytes, str, memoryview], Callable[[Dict[str, str]], None]]"  [arg-type]
+ aioredis/client.py:4136: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[Union[bytes, str], Optional[Any]]"; expected "Mapping[Union[bytes, str, memoryview], Callable[[Dict[str, str]], None]]"  [arg-type]

jax (https://github.com/google/jax)
+ jax/_src/nn/functions.py:355: error: Argument 1 to "index" has incompatible type "Union[int, Hashable]"; expected "SupportsIndex"  [arg-type]

urllib3 (https://github.com/urllib3/urllib3)
+ src/urllib3/util/ssl_match_hostname.py:116: error: Argument 2 to "_ipaddress_match" has incompatible type "Union[IPv4Address, IPv6Address]"; expected "str"  [arg-type]

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/command_line_tool.py:1344: error: Redundant cast to "Callable[[str, str], int]"

rclip (https://github.com/yurijmikhalevich/rclip)
- rclip/db.py:70: error: Argument 1 to "update" of "dict" has incompatible type "NewImage"; expected "Mapping[Any, None]"
+ rclip/db.py:70: error: Argument 1 to "update" of "MutableMapping" has incompatible type "NewImage"; expected "Mapping[Any, None]"

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:583: error: Cannot call function of unknown type  [operator]
+ pandas/core/indexes/base.py:3857: error: Argument 1 has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsLE, _SupportsGE, _SupportsGT, _SupportsLT]"  [arg-type]
+ pandas/core/indexes/base.py:3857: error: Argument 2 has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "Union[_SupportsLE, _SupportsGE, _SupportsGT, _SupportsLT]"  [arg-type]
+ pandas/core/generic.py:1503: error: Argument 1 to "inv" has incompatible type "Union[ExtensionArray, ndarray[Any, Any]]"; expected "_SupportsInversion[ndarray[Any, dtype[bool_]]]"  [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:3502: error: Argument 2 to "ge" has incompatible type "Union[str, Any, float, Period, Timestamp, Timedelta, Sequence[Any], ndarray[Any, Any], NDFrame]"; expected "Union[_SupportsLE, _SupportsGE, _SupportsGT, _SupportsLT]"  [arg-type]
+ pandas/io/formats/style.py:3507: error: Argument 2 to "le" has incompatible type "Union[str, Any, float, Period, Timestamp, Timedelta, Sequence[Any], ndarray[Any, Any], NDFrame]"; expected "Union[_SupportsLE, _SupportsGE, _SupportsGT, _SupportsLT]"  [arg-type]

core (https://github.com/home-assistant/core)
+ homeassistant/components/http/forwarded.py:120: error: Unsupported operand types for in ("Union[IPv4Address, IPv6Address]" and "str")  [operator]
+ homeassistant/components/http/forwarded.py:149: error: Unsupported operand types for in ("Union[IPv4Address, IPv6Address]" and "str")  [operator]
+ homeassistant/components/http/ban.py:147: error: Argument 1 to "IpBan" has incompatible type "Union[IPv4Address, IPv6Address]"; expected "str"  [arg-type]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant