-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
formatterRelated to the formatterRelated to the formatterpreviewRelated to preview mode featuresRelated to preview mode features
Milestone
Description
Implement Black's multiline_string_handling as a preview style.
Ruff already implements (as part of stable) the new style when calling functions on a multiline string:
MULTILINE = """
foobar
""".replace(
"\n", ""
)Get's formatted to
MULTILINE = """
foobar
""".replace("\n", "")However, Ruff doesn't yet implement the new style when passing a multiline string in a function call:
textwrap.dedent(
"""\
This is a
multiline string
"""
)Gets formatted to:
textwrap.dedent("""\
This is a
multiline string
""")Note: It's not yet decided if this style will make it into Black's 2024 stable style
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formatterpreviewRelated to preview mode featuresRelated to preview mode features