Incorrect line breaking with expressions that use parenthesis #2508
Labels
F: parentheses
Too many parentheses, not enough parentheses, and so on.
R: duplicate
This issue or pull request already exists
T: style
What do we want Blackened code to look like?
Describe the bug
Black does not correctly break lines in some cases. In the first two of these examples below it incorrectly puts
foo(
at the end of a line instead of breaking at theor
binary operator as it should. In the other three cases, where I've added a thirdor
clause, it breaks correctly.This code
is incorrectly formatted as
To Reproduce
Using https://black.vercel.app/ enter this code:
Expected behavior
All of these should follow PEP 8 and break before the
or
operator.Environment (please complete the following information):
Does this bug also happen on main?
Yes. main == @06ccb8 at the time I submitted this.
The text was updated successfully, but these errors were encountered: