-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix used-before-assignment
false positive for walrus operator in dictionary
#8176
Fix used-before-assignment
false positive for walrus operator in dictionary
#8176
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8176 +/- ##
=======================================
Coverage 95.53% 95.53%
=======================================
Files 177 177
Lines 18622 18624 +2
=======================================
+ Hits 17791 17793 +2
Misses 831 831
|
used-before-assignment
false positiveused-before-assignment
false positive for walrus operator in dictionary
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit ed66132 |
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.
LGTM, but the expert about this is Jacob, we can wait a little to merge.
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.
Looks good, thank you! This is so good, it alerted me to another false positive.
The check for BaseContainer
should also check all elements. I can handle that in another PR.
…ctionary (#8176) (#8254) (cherry picked from commit 32e1545) Co-authored-by: Zen Lee <[email protected]>
Type of Changes
Description
Fix false positive when the walrus operator is used with the ternary operator in dictionary key/value initialization.
Closes #8125