-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hi all!
While updating from Ruff 0.1.11 to 0.1.13 I found a small bug in the newly created rule PLC2801.
I had the code:
a = 2
b = -a.__sub__(1)
# b == -1With the auto linter Ruff fixed this to:
a = 2
b = -a - 1
# b == -3The order of operations is changed, to fix this Ruff needs to add some parenthesis (b = -(a-1)).
I have no experience with Rust, so I am not able to help, but I wanted to let you know of the issue. Thank you for making Rust! It's an absolutely amazing tool!!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working