static-join
What it does
Section titled “What it does”Reports "sep".join([a, b]) where the list or tuple is written out in the call.
Why it matters
Section titled “Why it matters”The items are known where they are written, so the result is a fixed text with the items inserted, which an f-string says directly without building a list.
To fix, write an f-string: f"{a}, {b}".
Example
Section titled “Example”...
a = b = "x"x = ", ".join([a, b])
...
...Configuration
Section titled “Configuration”python: lint: rules: static-join: warn # off (default), warn, errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line static-join 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 | FLY002 |
full |