string-dot-format-extra-named-arguments
What it does
Section titled “What it does”Reports a .format call with keyword arguments that no field names.
Why it matters
Section titled “Why it matters”Python ignores the extra keywords without an error, so a leftover after an edit, or a field that was misspelled, goes unnoticed.
To fix, remove the keyword, or add the field.
Example
Section titled “Example”..."{x}".format(y=1)"{x}".format(x=1, y=2)"{:{}}".format(a, b)..."{} {x}".format(*a, **b)...Configuration
Section titled “Configuration”python: lint: rules: string-dot-format-extra-named-arguments: warn # off, warn (default), errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line string-dot-format-extra-named-arguments 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 | F522 |
full |