-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.Issues with the preview and unstable style. Add the name of the responsible feature in the title.T: bugSomething isn't workingSomething isn't working
Description
Reports from @amyreese in #4042 (comment):
# before
Thing(
"""
value
"""
)
# after
Thing("""
value
""")
# before
VALUE = [
Thing(
"""
value
"""
)
]
# after
VALUE = [Thing("""
value
""")]
# before
func(
(
value
+ """
something
"""
),
argument,
)
# after
func(
(value + """
something
"""),
argument,
)
# before
def foo():
result = (
"""
something
"""
+ value
)
# after
def foo():
result = """
something
""" + value
I just enabled only multiline_string_handling
and ran Black on my work codebase. Many changes are improvements, but quite a few look uglier.
Some examples:
xxxx_xxxxxxx.xxxxxx_xxxxxxxxxxxx_xxxxxx_xx_xxx_xxxxxx: {
"xxxxx": """Sxxxxx xxxxxxxxxxxx xxx xxxxx (xxxxxx xxx xxxxxxx)""",
- "xxxxxxxx": (
- """Sxxxxxxx xxxxxxxx, xxxxxxx xx xxxxxxxxx
- xxxxxxxxxxxxx xxxxxxx xxxxxxxxx xxx-xxxxxxxxxx xxxxxx xx xxx-xxxxxx"""
- ),
+ "xxxxxxxx": ("""Sxxxxxxx xxxxxxxx, xxxxxxx xx xxxxxxxxx
+ xxxxxxxxxxxxx xxxxxxx xxxxxxxxx xxx-xxxxxxxxxx xxxxxx xx xxx-xxxxxx"""),
},
for xxx_xxxx, xxx_xxxx, xxx_xxxxxxx, xxx_xxxxxxx in xxxxxx_xxxxx:
- xxxx = (
- x"""
+ xxxx = x"""
({x.x18x.xxx.xxxxxx_xxxxxx(xxx_xxxx)} xx {x.x18x.xxx.xxxxxx_xxxxxx(xxx_xxxx)})
- """
- if xxx_xxxx != xxx_xxxx
- else x.x18x.xxx.xxxxxx_xxxxxx(xxx_xxxx)
- )
+ """ if xxx_xxxx != xxx_xxxx else x.x18x.xxx.xxxxxx_xxxxxx(xxx_xxxx)
(Harder to notice the ternary)
cc @aneeshusa as the author of #1879
I'm inclined to remove this feature from the 2024 stable style given this feedback.
itamaro, zsol and paulclarkaranz
Metadata
Metadata
Assignees
Labels
C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.Issues with the preview and unstable style. Add the name of the responsible feature in the title.T: bugSomething isn't workingSomething isn't working