You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fix for unnecessary-dunder-call (PLC2801) in Ruff 0.9.3 can change the program’s behavior when the rewritten expression is followed by an attribute access or a subscript access. The fix should wrap the rewritten expression in parentheses in those contexts.
@dylwil3@AlexWaygood Happy to fix this. I checked the code, there is already a check and logic for wrapping expression in parens, it's just ignoring attribute access, subscript and function call for some reason as lower precedence, which is not correct. Probably a matter of removing 3 lines + updating a test
Description
The fix for
unnecessary-dunder-call
(PLC2801) in Ruff 0.9.3 can change the program’s behavior when the rewritten expression is followed by an attribute access or a subscript access. The fix should wrap the rewritten expression in parentheses in those contexts.The text was updated successfully, but these errors were encountered: