skillfed

flake8-pep3101

Checks for old string formatting

flake8-pep3101 v3.0.0 98.0K downloads/30d#13,114 on PyPI14
Copyleft 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) AGING released

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-pep3101

uv

uv add flake8-pep3101

poetry

poetry add flake8-pep3101

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software DevelopmentTopic :: Software Development :: Quality Assurance

Tags

flake8 string formatting checkerdetect old string formattingpercent operator linterpep 3101 compliancepython code style enforcementformat method migrationflake8 plugin
lintingcode-styleflake8-plugin

More Software Development packages