Summary
Please change ruff format's behaviour for concatenating multi-line strings.
For example:
outputFile.write(
"</notes>\n"
f"<segment>\n"
f"<source>{xmlEscape(source)}</source>\n"
"</segment>\n"
"</unit>\n",
)
Should not concatenate to
outputFile.write(
f"</notes>\n<segment>\n<source>{xmlEscape(source)}</source>\n</segment>\n</unit>\n",
)
I cannot find a way to disable this behaviour - or disabling string concatenation in general when using ruff format.
Any suggestions on how to use ruff format without multiline string concatenation would be helpful.
Reasoning
Multi-line strings split over new lines is usually a very intended form of syntax.
Splitting strings over multiple lines at fixed positions helps with readability.
I think there is more value in disabling this feature for ruff format than having it enabled.
Summary
Please change ruff format's behaviour for concatenating multi-line strings.
For example:
Should not concatenate to
I cannot find a way to disable this behaviour - or disabling string concatenation in general when using ruff format.
Any suggestions on how to use ruff format without multiline string concatenation would be helpful.
Reasoning
Multi-line strings split over new lines is usually a very intended form of syntax.
Splitting strings over multiple lines at fixed positions helps with readability.
I think there is more value in disabling this feature for ruff format than having it enabled.