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

Enhanced isinstance narrowing logic to retain type arguments in cas… #9144

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

erictraut
Copy link
Collaborator

…es where the filter type (the second argument) is a child of the un-narrowed type and the child has a type parameter that is used multiple times in its base class (e.g. Child[T](Parent[T, T])). This addresses #9141.

…es where the filter type (the second argument) is a child of the un-narrowed type and the child has a type parameter that is used multiple times in its base class (e.g. `Child[T](Parent[T, T])`). This addresses #9141.
Copy link
Contributor

github-actions bot commented Oct 3, 2024

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

steam.py (https://github.com/Gobot1234/steam.py)
+   /tmp/mypy_primer/projects/steam.py/steam/ext/commands/converters.py:258:29 - error: Type of "message" is partially unknown
+     Type of "message" is "ChatMessage[Unknown, Unknown]" (reportUnknownMemberType)
- 8440 errors, 95 warnings, 0 informations 
+ 8441 errors, 95 warnings, 0 informations 

@erictraut erictraut merged commit cd5f5d3 into main Oct 3, 2024
18 checks passed
@erictraut erictraut deleted the issue-9141 branch October 3, 2024 20:33
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