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
f(
"lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor""incididunt ut labore et dolore magna aliqua Ut enim ad minim",
"",
)
Expected output:
f(
(
"lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor""incididunt ut labore et dolore magna aliqua Ut enim ad minim"
),
"",
)
This was implemented and reverted due to disruptive changes:
f(
x,
- "lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor" - "incididunt ut labore et dolore magna aliqua Ut enim ad minim",+ (+ "lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor" + "incididunt ut labore et dolore magna aliqua Ut enim ad minim"+ ),
)
I think that it should be re-enabled, because it does improve style, readability, and catch bugs. Some additional cases should be considered:
Only wrap the string if it shares a boundary with an expression that starts with a string literal:
KotlinIsland
changed the title
(🐞) String processing: wrap concatenated strings in parens in all cases
(🐞) String processing: re-enable wrap concatenated strings in parens in all cases
Oct 19, 2023
KotlinIsland
changed the title
(🐞) String processing: re-enable wrap concatenated strings in parens in all cases
(🎁) String processing: re-enable wrap concatenated strings in parens in all cases
Oct 19, 2023
input:
Expected output:
Actual:
No change
Playground
playground
Context:
This was implemented and reverted due to disruptive changes:
I think that it should be re-enabled, because it does improve style, readability, and catch bugs. Some additional cases should be considered:
Details
Details
I feel like this is a healthy balance of disruption and readability.
Related:
Black version 23.10.0
The text was updated successfully, but these errors were encountered: