Consider keeping the parens of implicitly concatenated strings when it's a argument of a function call #3260
Labels
F: parentheses
Too many parentheses, not enough parentheses, and so on.
F: strings
Related to our handling of strings
T: style
What do we want Blackened code to look like?
Describe the style change
Original code:
Examples in the current Black preview style
black --preview removes the parens since they are "not necessary":
Desired style
Keep the parens:
Additional context
Parens in this case can increase readability, Black can choose to NOT universally add parens for them (see #3162 (comment)). However, if the code explicitly adds parens to the implicitly concatenated strings, I suggest Black not removing them as the parens are indications of needing to wrap the string to increase readability.
This might be not necessary if Black chooses to use explicit str concatenations (#2553).
The text was updated successfully, but these errors were encountered: