# Input
if (
(1 + 2) or # test
(3 + 4) or # other
(4 + 5) # more
): pass
if (
(1 and 2) + # test
(3 and 4) + # other
(4 and 5) # more
): pass
if (
(1 + 2) < # test
(3 + 4) > # other
(4 + 5) # more
): pass
# Output
if (
(
1 + 2 # test
)
or (
3 + 4 # other
)
or (4 + 5) # more
):
pass
if (
(
1 and 2 # test
)
+ (3 and 4) # other
+ (4 and 5) # more
):
pass
if (
(
1 + 2 # test
)
< (
3 + 4 # other
)
> (4 + 5) # more
):
pass
Expected
Ruff not to expand the parenthesized right sides.
Note: Prettier handles this correctly
Expected
Ruff not to expand the parenthesized right sides.