-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Propagate type narrowing to nested functions #15133
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
Changes from 21 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
e4ecb91
Add test case
JukkaL 05e3958
WIP debugging stuff
JukkaL f3c87ca
Propagate narrowed types to nested functions in some cases
JukkaL 01e044d
Add test cases
JukkaL eecc877
Support for and with statements
JukkaL 030457e
Test more
JukkaL 7968859
Fix nested functions
JukkaL 7603f24
Add unit tests
JukkaL a81856a
More testing
JukkaL c503b3c
Check if a match statement assigns to a variable
JukkaL a601098
Support walrus expression
JukkaL fe05131
Fix self check and isort
JukkaL 9d0b478
Add docstrings
JukkaL 639a9a1
Minor tweak to test
JukkaL 6dbf9f1
Refactoring and comment updates
JukkaL d463240
More refactoring
JukkaL 77b67df
Test narrowing multiple variables
JukkaL 339ae64
Add another test case
JukkaL 56c3f3a
Don't leak frames + add assert to find frame leaks
JukkaL 24faaa5
Test method
JukkaL ecc2d34
Fix mypyc build
JukkaL 67098aa
Update mypy/literals.py
JukkaL 25cafbd
Fix tests when using compiled mypy
JukkaL 40f3b53
Fix unused import
JukkaL 4bfb5f1
Actually fix compiled mypy
JukkaL 0c4dce4
Add more tests for reading narrowed variable after nested function
JukkaL 4fe08c2
Fix dealing with member and index expressions after nested function
JukkaL dc6516e
Merge branch 'master' into nested-func-optional
JukkaL c323e06
Fix test case
JukkaL c350905
More tests
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 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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.