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
Black treats long lines that can be broken into two differently from those that can be broken into three or more. It seems to me that, unfortunately, in the first case it does it quite poorly.
Examples in the current Black style
match"some very long string to match".split():
case ["string", "some", "very", "long", "to", "match"] | [
"very",
"some",
"long",
"string",
"to",
"match",
]:
pass
Desired style
match"some very long string to match".split():
case (
["string", "some", "very", "long", "to", "match"]
| ["very", "some", "long", "string", "to", "match"]
):
pass
Additional context
This is how black currently formats long lines, which can be broken into three or more.
match"some very long string to match".split():
case (
["string", "some", "very", "long", "to", "match"]
| ["very", "some", "long", "string", "to", "match"]
| ["some", "very", " long", "string", "to", "match"]
):
pass
The text was updated successfully, but these errors were encountered:
ghost
added
the
T: style
What do we want Blackened code to look like?
label
Feb 1, 2024
Describe the style change
Black treats long lines that can be broken into two differently from those that can be broken into three or more. It seems to me that, unfortunately, in the first case it does it quite poorly.
Examples in the current Black style
Desired style
Additional context
This is how black currently formats long lines, which can be broken into three or more.
The text was updated successfully, but these errors were encountered: