implicit-concat-in-collection
What it does
Section titled “What it does”Reports an element of a list, tuple or set that is several string literals one after the other, with no parentheses and no comma.
Why it matters
Section titled “Why it matters”Python joins adjacent literals into one string. In a collection that is usually a comma that was left out, and the two items silently become one.
To fix, add the comma, or put the parts in parentheses if one string is meant.
Example
Section titled “Example”... pass
x = ["a" "b", "c"]
...
...Configuration
Section titled “Configuration”python: lint: rules: implicit-concat-in-collection: warn # off (default), warn, errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line implicit-concat-in-collection in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| ruff | ISC004 |
full |