Skip to content

Conversation

@Vaishnavi-KN
Copy link

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

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.

Cannot determine type of walrus operator variable in list comprehension

1 participant