percent-format-missing-argument
What it does
Section titled “What it does”Reports a % format with named placeholders that the dict does not have.
Why it matters
Section titled “Why it matters”Python raises a KeyError for the first missing key when the line runs. A key that is misspelled in the string or in the dict is the usual cause.
To fix, add the key, or correct the name.
Example
Section titled “Example”..."%(x)s %(y)s" % {"x": 1}..."%s" % a...Configuration
Section titled “Configuration”python: lint: rules: percent-format-missing-argument: warn # off, warn (default), errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line percent-format-missing-argument 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 | F505 |
full |