Consider keeping the parens of implicitly concatenated strings when it's a argument of a function call
Describe the style change
Original code:
function_call(
(
" lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor"
" incididunt ut labore et dolore magna aliqua Ut enim ad minim"
),
" veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",
)
Examples in the current Black preview style
black --preview removes the parens since they are "not necessary":
function_call(
" lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor"
" incididunt ut labore et dolore magna aliqua Ut enim ad minim",
" veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",
)
Desired style
Keep the parens:
function_call(
(
" lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor"
" incididunt ut labore et dolore magna aliqua Ut enim ad minim"
),
" veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",
)
Additional context
Parens in this case can increase readability, Black can choose to NOT universally add parens for them (see https://github.com/psf/black/pull/3162#issuecomment-1228778654). 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).
I'd be open to keeping them, or even going all the way. But I understand that diffs getting larger is awkward.
This is obsoleted by #3292 (implemented in #3307).