string-dot-format-extra-positional-arguments
What it does
Section titled “What it does”Reports a .format call with positional arguments that no field uses.
Why it matters
Section titled “Why it matters”Python ignores the extra arguments without an error. It is usually a field that was removed from the string, or one that was never added.
To fix, remove the argument, or add the field.
Example
Section titled “Example”..."{}".format(a, b)..."{:{}}".format(a, b)...Configuration
Section titled “Configuration”python: lint: rules: string-dot-format-extra-positional-arguments: warn # off, warn (default), errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line string-dot-format-extra-positional-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 | F523 |
full |