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
Desired style
The above is clearly not ideal as 0 is placed on its own line. I imagined that black would format the original function along the lines of:
anyway, i believe this can be closed as a duplicate of #2156. if there are more than 2 expressions the expression will be split over multiple lines, e.g. with 3
Describe the style change
I've just encountered an odd situation where
black
places a list index on a completely separately line.Examples in the current Black style
Under default parameters, the following code snippet
is converted by
black 22.1.0
to:Desired style
The above is clearly not ideal as
0
is placed on its own line. I imagined thatblack
would format the original function along the lines of:Additional context
That being said, if the original snippet is changed to:
(that is, if we remove the parentheses around the inequality condition), then
black
formats everything correctly:Is this a bug or not?
The text was updated successfully, but these errors were encountered: