flake8-pep3101
Checks for old string formatting
What it is and what it does
flake8-pep3101 is a linter plugin that integrates with flake8 to detect and report old-style percent-operator string formatting in Python code. It encourages developers to use the modern .format() method or f-strings instead, aligning with PEP 3101 recommendations. The plugin works as a flake8 extension, running automatically when you invoke flake8 on your codebase without requiring separate configuration.
The package has been in production since 2015 and supports modern Python versions (3.10 through 3.14, including PyPy). It is a lightweight, single-purpose tool with only flake8 as a runtime dependency. While maintenance is aging—no updates in 293 days—the repository remains active and unarchived, and the package carries no known security vulnerabilities.
Use it for:
- Enforce consistent string formatting style across a codebase during CI/CD by running flake8 with this plugin enabled.
- Identify legacy string formatting in older Python projects to guide modernization efforts toward .format() or f-strings.
- Integrate into pre-commit hooks to catch old-style formatting before code review.
- Audit a large repository for formatting inconsistencies as part of a code quality initiative.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A flake8 plugin that detects and flags old-style string formatting (percent operator) in Python code, encouraging migration to the .format() method or f-strings.
Yes, if you want automated enforcement of modern string formatting in your codebase. The plugin is low-friction to install, carries no security vulnerabilities, and integrates seamlessly into flake8 workflows. The copyleft license is not a barrier for development tools used in-house. The aging maintenance status is a minor concern but not a blocker—the plugin solves a narrow, stable problem and does not require frequent updates. Install it if string formatting consistency is a priority in your project.
Install
flake8-pep3101 on PyPI
pip
pip install flake8-pep3101uv
uv add flake8-pep3101poetry
poetry add flake8-pep3101Installing flake8-pep3101
Before you install
Low install friction with a single runtime dependency on flake8. Maintenance status is aging—last commit was 2025-10-25 and the package has not been updated in 293 days, though the repository remains active and unarchived.
License in practice
Licensed under GPLv2 (copyleft). If you distribute code or modifications, you must make source available under the same license terms. For private use or as a development tool in a closed environment, this poses minimal constraint.
Quickstart
pip install flake8-pep3101
Then run flake8 on your code:
flake8 your_file.py
The plugin will automatically flag old-style string formatting like:
result = "Hello %s" % name
Requires flake8 to be installed; the plugin does not work standalone. Requires Python 3.10 or later.
Verify before relying
- Whether the plugin's error codes and configuration options are documented or discoverable
- Performance impact when checking large codebases
- Whether the plugin handles edge cases in string formatting detection correctly
Package facts
| License | GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and… (full text in the JSON record) (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — flake8 |
| Maintenance | aging — 293 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,031/month — #13,114 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flake8_pep3101-3.0.0-py3-none-any.whl
Keywords: flake8, pep8, pycodestyle, python, string formatting
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
flake8-string-formatA Flake8 plugin that validates string format…
permissive · top 15,000 on PyPI
flake8-use-fstringA flake8 plugin that detects and flags…
permissive · top 15,000 on PyPI
flake8-deprecatedA flake8 plugin that detects calls to…
copyleft · top 15,000 on PyPI
flyntFlynt is a command-line tool that automatically…
permissive · top 15,000 on PyPI
stringparserExtracts values from strings using…
permissive · top 15,000 on PyPI
future-fstringsEnables f-string syntax in Python versions…
permissive · top 15,000 on PyPI
pep8-namingA flake8 plugin that checks Python code for…
permissive · top 5,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
flake8-annotationsA Flake8 plugin that enforces PEP 3107-style…
permissive · top 15,000 on PyPI
flake8-pep585A flake8 plugin that detects and flags…
copyleft · top 15,000 on PyPI