percent-format-unsupported-format-character
What it does
Section titled “What it does”Reports a % format with a conversion character that Python does not know, as in "%z" % x.
Why it matters
Section titled “Why it matters”Python raises ValueError: unsupported format character when the line runs. It is usually a literal % that should have been written %%.
To fix, write %% for a percent sign, or a conversion Python has (s, r, a, d, i, f, x and so on).
Example
Section titled “Example”a = b = c = 1..."%z" % a...Configuration
Section titled “Configuration”python: lint: rules: percent-format-unsupported-format-character: warn # off, warn (default), errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line percent-format-unsupported-format-character 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 | F509 |
full |