flake8-string-format
string format checker, plugin for flake8
What it is and what it does
flake8-string-format is a Flake8 linter plugin that analyzes all string format operations in your code and reports errors when format calls don't match their arguments. It detects unindexed parameters (which fail in Python 2.6), mismatched argument counts, unused parameters, and mixing of implicit and explicit indexing. The plugin integrates directly into Flake8's error reporting and can be controlled via standard Flake8 ignore flags.
It works by parsing format strings and their corresponding format() calls, checking whether the parameters referenced in the string actually exist in the call's arguments. It distinguishes between format strings (where format() is called), docstrings, and plain strings, issuing different error codes for each context. The plugin handles variable arguments gracefully by skipping checks that would be unreliable when *args or **kwargs are present.
Use it for:
- Catch format string bugs during CI/CD by detecting mismatched argument counts before runtime
- Enforce Python 2.6 compatibility by flagging unindexed parameters like '{}'.format(x)
- Identify unused parameters passed to format() calls, reducing confusion and maintenance burden
- Detect typos in keyword argument names in format strings like '{name}'.format(nmae=value)
- Validate docstrings and other string literals for consistent format parameter usage
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Flake8 plugin that validates string format calls, checking for mismatched parameters, missing arguments, and unindexed format strings incompatible with Python 2.6.
Yes, if you use Flake8 and want to catch format string errors statically. The plugin is lightweight, actively maintained, permissively licensed, and has no known vulnerabilities. Install it if format string correctness matters in your codebase; skip it only if you never use str.format() or already rely on type checking and runtime testing to catch these errors.
Install
flake8-string-format on PyPI
pip
pip install flake8-string-formatuv
uv add flake8-string-formatpoetry
poetry add flake8-string-formatInstalling flake8-string-format
Before you install
Low friction: pure Python wheel with a single runtime dependency on flake8. Actively maintained as of 2026-06-09 with recent Python 3.14 compatibility fixes.
License in practice
MIT license (permissive) — no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install flake8-string-format
Then run flake8 as usual; the plugin auto-registers:
$ flake8 your_file.py
your_file.py:1:1: FMT101 format string contains unindexed parameters
Requires flake8 to be installed; Python >= 3.8 required.
Verify before relying
- Whether the plugin correctly handles all modern f-string edge cases beyond str.format()
- Performance impact on large codebases with many format strings
- Compatibility with recent Flake8 versions beyond 3.0
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — flake8 |
| Maintenance | actively maintained — 66 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 170,838/month — #10,385 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flake8_string_format-0.4.0-py3-none-any.whl
Keywords: flake8, format
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
flake8-pep3101A flake8 plugin that detects and flags…
copyleft · top 15,000 on PyPI
flake8-implicit-str-concatA Flake8 plugin that detects and reports…
permissive · top 15,000 on PyPI
flake8-no-implicit-concatA flake8 plugin that detects and forbids…
permissive · top 15,000 on PyPI
flake8-use-fstringA flake8 plugin that detects and flags…
permissive · top 15,000 on PyPI
flake8-noqaA flake8 plugin that validates the formatting…
copyleft · top 5,000 on PyPI
flake8-broken-lineA flake8 plugin that detects and forbids…
permissive · top 15,000 on PyPI
flake8-rst-docstringsA flake8 plugin that validates Python…
permissive · top 15,000 on PyPI
flake8-annotationsA Flake8 plugin that enforces PEP 3107-style…
permissive · top 15,000 on PyPI
flake8-printA flake8 plugin that detects print statements…
permissive · top 5,000 on PyPI
flake8-mutableA flake8 plugin that detects mutable default…
permissive · top 15,000 on PyPI