Only warn for implicit string concatenation when parts are _not_ surrounded by a set of parentheses #7929
Labels
Enhancement ✨
Improvement to a component
Needs specification 🔐
Accepted as a potential improvement, and needs to specify edge cases, message names, etc.
Current problem
As I would like to be warned for an omission like the following: ...
(note the missing comma after
"red"
), I've activated pylint'scheck-str-concat-over-line-jumps
check.In order to prevent a
line-too-long
warning for the following code fragment:I could break down such a fragment into something like:
but my preference would be a format, equal to how the
black
formatter would reformat the example right above:However, because I activated the
check-str-concat-over-line-jumps
check, I get a (false?) positive check on the fragment above.What can be done so that I will be warned for the
COLORS
example above, but not for the intentional string concatenation?Desired solution
My request is that pylint only warns about implicit string concatenation in case the parts of the concatenations are not collected in a set of parentheses.
Whether that "feature" should be accompanied by a configuration item or not is something I cannot judge about.
Additional context
Have a look at #6663 as well, as I think that simply adding parentheses to the string concatenation in that particular example would be a perfectly acceptable workaround for me.
The text was updated successfully, but these errors were encountered: