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

11028 - Fix warlus operator behavior when called by a function #11041

Merged
merged 5 commits into from
May 30, 2023

Conversation

aless10
Copy link
Contributor

@aless10 aless10 commented May 27, 2023

In #10758 we introduced the support for the use of the walrus operator in the test cases. There was a case which was not handled that caused a bug report #11028. This PR aims to fix the issue and also to improve how the walrus operator is handled in the AssertionRewriter class.

closes #11028

Made during Open Source Saturday Italy

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @aless10, thanks for tackling this so quickly, we definitely appreciate it. 👍

changelog/11028.bugfix.rst Outdated Show resolved Hide resolved
testing/test_assertrewrite.py Outdated Show resolved Hide resolved
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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.

UnboundLocalError: cannot access local variable 'x' where it is not associated with a value
2 participants