-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Revert "Narrow based on collection containment (#17344)" #17865
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
Merged
Merged
Conversation
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
Diff from mypy_primer, showing the effect of this PR on open source code: pycryptodome (https://github.com/Legrandin/pycryptodome)
- lib/Crypto/SelfTest/Signature/test_dss.py:334: error: Incompatible types in assignment (expression has type "None", variable has type "str") [assignment]
pydantic (https://github.com/pydantic/pydantic)
- pydantic/v1/generics.py:124: error: No overload variant of "create_model" matches argument types "str", "str", "tuple[Any, ...]", "None", "dict[str, classmethod[Any, Any, Any]]", "None", "dict[str, tuple[DeferredType, FieldInfo]]" [call-overload]
+ pydantic/v1/generics.py:124: error: No overload variant of "create_model" matches argument types "str", "str", "tuple[Any, ...]", "None", "dict[str, classmethod[Any, Any, Any]]", "None", "dict[Any, tuple[DeferredType, FieldInfo]]" [call-overload]
Tanjun (https://github.com/FasterSpeeding/Tanjun)
+ tanjun/context/menu.py:141: error: Incompatible return value type (got "CommandType", expected "Literal[CommandType.USER, CommandType.MESSAGE]") [return-value]
- tanjun/commands/menu.py:534: error: Incompatible types in assignment (expression has type "CommandType", variable has type "Literal[CommandType.USER]") [assignment]
- tanjun/commands/menu.py:534: error: Incompatible types in assignment (expression has type "CommandType", variable has type "Literal[CommandType.MESSAGE]") [assignment]
psycopg (https://github.com/psycopg/psycopg)
- tests/types/test_array.py:212: error: Incompatible types in assignment (expression has type "type[int] | type[float]", variable has type "type[Decimal]") [assignment]
pandas (https://github.com/pandas-dev/pandas)
- pandas/core/arrays/string_.py:178: error: Redundant cast to "str" [redundant-cast]
- pandas/io/stata.py:1508: error: Redundant cast to "str" [redundant-cast]
- pandas/io/stata.py:1837: error: Redundant cast to "str" [redundant-cast]
- pandas/io/stata.py:1843: error: Redundant cast to "str" [redundant-cast]
- pandas/core/internals/concat.py:98: error: Argument 2 to "_is_homogeneous_mgr" has incompatible type "type[object]"; expected "dtype[Any] | ExtensionDtype" [arg-type]
- pandas/core/internals/concat.py:104: error: Argument 3 to "_concat_homogeneous_fastpath" has incompatible type "type[object]"; expected "dtype[Any]" [arg-type]
- pandas/tests/extension/test_masked.py:309: error: "str" has no attribute "name" [attr-defined]
operator (https://github.com/canonical/operator)
- ops/lib/__init__.py:241: error: Argument 1 to "_Missing" has incompatible type "dict[str, object]"; expected "bool" [arg-type]
+ ops/lib/__init__.py:241: error: Argument 1 to "_Missing" has incompatible type "dict[str | Any, object]"; expected "bool" [arg-type]
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/collections.py:391: error: "Never" not callable [misc]
+ src/prefect/server/api/server.py:498: error: Invalid index type "tuple[str, bool]" for "dict[tuple[Settings, bool], Any]"; expected type "tuple[Settings, bool]" [index]
sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/transforms/__init__.py: note: In member "apply" of class "DefaultSubstitutions":
- sphinx/transforms/__init__.py:121:68: error: Argument 1 to "_handle_default_substitution" of "DefaultSubstitutions" has incompatible type "str"; expected "Literal['version', 'release', 'today', 'translation progress']" [arg-type]
streamlit (https://github.com/streamlit/streamlit)
- lib/streamlit/elements/heading.py: note: In member "_handle_divider_color" of class "HeadingMixin":
- lib/streamlit/elements/heading.py:249:20: error: Redundant cast to "str" [redundant-cast]
spark (https://github.com/apache/spark)
- python/pyspark/pandas/utils.py:746: error: Redundant cast to "int" [redundant-cast]
colour (https://github.com/colour-science/colour)
- colour/io/image.py:670: error: Value of type variable "_IntType" of "iinfo" cannot be "object" [type-var]
- colour/io/image.py:671: error: Value of type variable "_IntType" of "iinfo" cannot be "object" [type-var]
- colour/io/image.py:675: error: Argument 2 to "as_int_array" has incompatible type "type[object]"; expected "type[signedinteger[_8Bit]] | type[signedinteger[_16Bit]] | type[signedinteger[_32Bit]] | type[signedinteger[_64Bit]] | type[unsignedinteger[_8Bit]] | type[unsignedinteger[_16Bit]] | type[unsignedinteger[_32Bit]] | type[unsignedinteger[_64Bit]] | None" [arg-type]
pytest (https://github.com/pytest-dev/pytest)
- src/_pytest/python_api.py:322: error: "Never" not callable [misc]
schema_salad (https://github.com/common-workflow-language/schema_salad)
- schema_salad/avro/schema.py: note: In function "make_avsc_object":
- schema_salad/avro/schema.py:703:30: error: Redundant cast to "str" [redundant-cast]
- schema_salad/schema.py: note: In function "make_valid_avro":
- schema_salad/schema.py:561:28: error: Redundant cast to "str" [redundant-cast]
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- pymongo/common.py:378: error: Incompatible return value type (got "str", expected "_ServerMode") [return-value]
aiortc (https://github.com/aiortc/aiortc)
+ src/aiortc/rtcpeerconnection.py:1143: error: Invalid index type "int | str" for "dict[int, RTCRtpDecodingParameters]"; expected type "int" [index]
steam.py (https://github.com/Gobot1234/steam.py)
+ steam/ext/csgo/state.py:210: error: Argument 1 to "__delitem__" of "dict" has incompatible type "int"; expected "AssetID" [arg-type]
+ steam/ext/csgo/state.py:211: error: Argument 1 to "__delitem__" of "dict" has incompatible type "int"; expected "AssetID" [arg-type]
discord.py (https://github.com/Rapptz/discord.py)
- discord/gateway.py:968: error: Argument 3 to "select_protocol" of "DiscordVoiceWebSocket" has incompatible type "Literal['xsalsa20_poly1305_lite', 'xsalsa20_poly1305_suffix', 'xsalsa20_poly1305']"; expected "int" [arg-type]
- discord/state.py:656: error: Unused "type: ignore" comment [unused-ignore]
jax (https://github.com/google/jax)
- jax/_src/interpreters/partial_eval.py:2587: error: Unused "type: ignore" comment [unused-ignore]
ibis (https://github.com/ibis-project/ibis)
- ibis/common/graph.py:156: error: "Never" not callable [misc]
mitmproxy (https://github.com/mitmproxy/mitmproxy)
- mitmproxy/addons/core.py:172: error: Unused "type: ignore" comment [unused-ignore]
|
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.
This reverts commit ed0cd4a.
See #17864 for context. The implementation has some issues, and I'm reverting the PR to unblock the 1.12 release.
Closes #17864. Closes #17841.