-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix crash on star unpacking to underscore #14624
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Can we clean up all the StarType code then?
Hm, it looks like yes, there are no more places where new (not copies) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Fixes #14250
This one is interesting. It looks like most likely this was caused by my PR #7127 that fixed other crash. After looking a bit more,
StarType
is something old, and should never by used. At least I didn't findvisit_star_type()
in any of the type visitors. Actually mypy already usesassert False
, if we get to a non-special-cased star expression.Btw, I noticed that
pythoneval
test with empty expected output passes in case of a crash (at least on my machine), so I fix this too.