-
Notifications
You must be signed in to change notification settings - Fork 882
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
non-augmented-assignment
(PLR6104
) - false positive on operators where the variable is on the other side
#10900
Labels
bug
Something isn't working
help wanted
Contributions especially welcome
preview
Related to preview mode features
Comments
MichaReiser
added
bug
Something isn't working
preview
Related to preview mode features
labels
Apr 12, 2024
CC: @lshi18 |
DetachHead
changed the title
Apr 12, 2024
non-augmented-assignment
(PLR6104
) - false positive on operatrors where the variable is on the other sidenon-augmented-assignment
(PLR6104
) - false positive on operators where the variable is on the other side
Hi @MichaReiser, I think that this implementation is only correct for commutative binary operators, but fails for others such as "/". And thank @charliermarsh for completing the work in #9932 . |
Ah thanks, I’ll fix that today! |
@charliermarsh Is this fixed for: test_string = "desired = " + test_string # False positive PLR6104 since |
No, I'll fix that separately. |
Glyphack
pushed a commit
to Glyphack/ruff
that referenced
this issue
Apr 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
help wanted
Contributions especially welcome
preview
Related to preview mode features
playground
in this example, the quickfix converts it to
a /= 0
which causes a runtimeZeroDivisionError
The text was updated successfully, but these errors were encountered: