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
Current black format the slice notation just after a multiline string literal over multiple lines, but that's unnecessary when the line containing closing triple quote is short.
Examples in the current Black style
s="""lorem ipsum dolor sit ametconsectetur adipiscing elitsed do eiusmod tempor incididuntut labore et dolore magna aliquaut enim ad minim veniamquis nostrud exercitation ullamcolaboris nisi ut aliquip ex ea commodoconsequat duis aute irure dolor inreprehenderit in voluptate velit essecillum dolore eu fugiat nulla pariaturexcepteur sint occaecat cupidatat nonproident sunt in culpa qui officiadeserunt mollit anim id est laborum"""[
1:
]
print(s)
Desired style
s="""lorem ipsum dolor sit ametconsectetur adipiscing elitsed do eiusmod tempor incididuntut labore et dolore magna aliquaut enim ad minim veniamquis nostrud exercitation ullamcolaboris nisi ut aliquip ex ea commodoconsequat duis aute irure dolor inreprehenderit in voluptate velit essecillum dolore eu fugiat nulla pariaturexcepteur sint occaecat cupidatat nonproident sunt in culpa qui officiadeserunt mollit anim id est laborum"""[1:]
print(s)
Additional context
The text was updated successfully, but these errors were encountered:
This issue is fixed in the currently unstable multiline_string_formatting style, togglable with --unstable or --preview --enable-unstable-feature multiline_string_formatting. It's still unstable due to it occasionally causing worse formatting, which is being tracked in #4159.
Describe the style change
Current black format the slice notation just after a multiline string literal over multiple lines, but that's unnecessary when the line containing closing triple quote is short.
Examples in the current Black style
Desired style
Additional context
The text was updated successfully, but these errors were encountered: