-
-
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 issues with type aliases and new style unions #14181
Merged
Merged
Changes from 8 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8d90d97
Fix issues with type aliases and new style unions
JukkaL acd93db
Black
JukkaL 51660b0
Fix test case
JukkaL f73ee51
WIP add failing cases
JukkaL 096d8bd
Fix aliases in stubs
JukkaL 3e4e809
Update test case
JukkaL a732e7a
Add test case covering #14158
JukkaL 41cd383
Minor tweaks
JukkaL afc8754
Fix TreeTransform
JukkaL ceee87b
Fix aststrip
JukkaL 8666b55
A few additional fixes + add test case
JukkaL 7a7284b
Fix type check
JukkaL 0716501
Black
JukkaL d178f7f
Merge remote-tracking branch 'origin/master' into fix-type-union
JukkaL ac2df6c
Remove accidentally added test stub
JukkaL 3980050
Merge branch 'master' into fix-type-union
JukkaL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
This should now be handled in various visitors. Three cases come to my mind: First,
treetransform.py
this is needed so that this error will not re-appear in a test case like thisSecond,
aststrip.py
, be sure that when you switch imported names from types to variables, you do get an error about missing__or__
on update. Third,semanal_typeargs.py
(usesMixedTraverserVisitor
), since we should not carry malformed instances around (with number of type args), they may cause crashes, add a test just in case with a malformed instance in|
alias.And in general adding in to the basic
TraverserVisitor
is a good idea. Maybe just grep fordef visit_index_expr(
and see where we useanalyzed
.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 good points! I'll fix these.