Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Fix walrus assignment type propagation across call arguments#20427
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
A5rocks left a comment
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.
For the test case, please:
- follow test name conventions
- use the inline comments for output
I also recommend using my repro as a test case, maybe separately.
(For some reason I'm unable to make an inline comment...)
Vaishnavi-KN commentedDec 17, 2025
I have updated the test to follow naming conventions and inline output comments as suggested. |
Uh oh!
There was an error while loading.Please reload this page.
According tomypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Mypy failed to infer the type of a variable assigned via the walrus operator
when the assignment appeared in an earlier keyword argument and the variable
was used in a later argument in the same call.
This PR evaluates call arguments once, left to right, so binder updates from
walrus assignments are preserved.
Fixes#20411