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

Fixed bug that results in a false negative if a | union operator cr… #9424

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

erictraut
Copy link
Collaborator

…eates a union of generic types. These types should be specialized with default type arguments. This addresses #9415.

…eates a union of generic types. These types should be specialized with default type arguments. This addresses #9415.
Copy link
Contributor

github-actions bot commented Nov 7, 2024

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

ibis (https://github.com/ibis-project/ibis)
+           "Value" is not assignable to "StringValue"
-             "Value" is not assignable to "StringValue"
+       Type "dict[str, Deferred]" is not assignable to type "(Value) -> Value"
-         Type parameter "_KT@Mapping" is invariant, but "str" is not the same as "str | None"
+         Type parameter "_KT@Mapping" is invariant, but "str" is not the same as "str | None" (reportArgumentType)
-       Type "dict[str, Deferred]" is not assignable to type "(Value) -> Value" (reportArgumentType)
+       Type "dict[str, Deferred]" is not assignable to type "(Value) -> Value"
-         Type parameter "_KT@Mapping" is invariant, but "str" is not the same as "str | None"
+         Type parameter "_KT@Mapping" is invariant, but "str" is not the same as "str | None" (reportArgumentType)
-       Type "dict[str, Deferred]" is not assignable to type "(Value) -> Value" (reportArgumentType)
+         Type "Value" is not assignable to type "(Value) -> Value"
-         "Value" is not assignable to "Mapping[str | None, Deferred | ((Value) -> Value)]"
+         "Value" is not assignable to "Mapping[str | None, Deferred | ((Value) -> Value)]" (reportArgumentType)
-         Type "Value" is not assignable to type "(Value) -> Value" (reportArgumentType)
+       Type "Value" is not assignable to type "(Value) -> Value"
-       "Value" is not assignable to "Mapping[str | None, Deferred | ((Value) -> Value)]"
+       "Value" is not assignable to "Mapping[str | None, Deferred | ((Value) -> Value)]" (reportArgumentType)
-       Type "Value" is not assignable to type "(Value) -> Value" (reportArgumentType)
-       Type "Value" is not assignable to type "(Value, Value) -> Value"
+       Type "Value" is not assignable to type "(Value) -> Value"
-       Type "Value" is not assignable to type "(Value) -> Value" (reportArgumentType)
+       Type "Value" is not assignable to type "(Value, Value) -> Value" (reportArgumentType)
-       Type "Value" is not assignable to type "(Value, IntegerValue) -> (bool | BooleanValue)"
+       Type "Value" is not assignable to type "(Value) -> (bool | BooleanValue)"
-       Type "Value" is not assignable to type "(Value) -> (bool | BooleanValue)" (reportArgumentType)
+       Type "Value" is not assignable to type "(Value, IntegerValue) -> (bool | BooleanValue)" (reportArgumentType)

mitmproxy (https://github.com/mitmproxy/mitmproxy)
-         "None" is not assignable to "WebSocketMessage"
+         "None" is not assignable to "UDPMessage"
-         "None" is not assignable to "UDPMessage" (reportArgumentType)
+         "None" is not assignable to "WebSocketMessage" (reportArgumentType)
-         "None" is not assignable to "WebSocketMessage"
+         "None" is not assignable to "UDPMessage"
-         "None" is not assignable to "UDPMessage" (reportArgumentType)
+         "None" is not assignable to "WebSocketMessage" (reportArgumentType)
-         "None" is not assignable to "WebSocketMessage"
+         "None" is not assignable to "UDPMessage"
-         "None" is not assignable to "UDPMessage" (reportArgumentType)
+         "None" is not assignable to "WebSocketMessage" (reportArgumentType)

@erictraut erictraut merged commit a4ed777 into main Nov 8, 2024
18 checks passed
@erictraut erictraut deleted the issue-9415-2 branch November 8, 2024 00:13
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