Skip to content
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

[used before def] handle walrus declaration in match subject correctly #14665

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

ilinum
Copy link
Collaborator

@ilinum ilinum commented Feb 9, 2023

The subject needs to be processed outside of match statement and not as part of the first branch.

Fixes #14659.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JukkaL JukkaL merged commit 4261e51 into python:master Feb 10, 2023
ilinum added a commit to ilinum/mypy that referenced this pull request Feb 10, 2023
python#14665)

The subject needs to be processed outside of match statement and not as
part of the first branch.

Fixes python#14659.
JukkaL pushed a commit that referenced this pull request Feb 13, 2023
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.

used-before-def incorrectly flagged when using match/case with a walrus operator
3 participants