skillfed

flake8-print

print statement checker plugin for flake8

flake8-print v5.0.0 1.3M downloads/30d#4,029 on PyPI121
Permissive license MIT Abandoned released

What it is and what it does

flake8-print is a flake8 plugin that automatically detects print statements and pprint calls in your Python code during linting. It integrates directly into flake8's workflow and assigns specific error codes (T201 for print, T203 for pprint calls, T204 for pprint declarations) so you can enforce a policy against debug print statements in production code. The plugin uses AST-based analysis to avoid false positives from print appearing in strings or comments.

The package depends on flake8 and pycodestyle, so it works only as part of a flake8 setup. You install it alongside flake8, and it becomes available automatically when you run flake8. You can selectively disable the checks per file or folder using flake8's standard per-file-ignores configuration.

Use it for:

  • Enforce a no-debug-prints policy in production codebases by catching print() calls during CI/CD linting.
  • Detect accidental pprint imports or calls left behind during development before merging to main.
  • Selectively allow print statements in scripts or CLI modules while blocking them in library code using per-file-ignores.
  • Migrate legacy Python 2 print statements to Python 3 by identifying all print usage in a codebase.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A flake8 plugin that detects print statements and pprint calls in Python code, flagging them with error codes T201, T203, and T204 for code quality enforcement.

Yes, if you are already using flake8 and want automated detection of print statements in your codebase. The plugin has low install friction and no known vulnerabilities. However, the package is abandoned (last release 2022-04-30, no maintenance since), so compatibility with newer flake8 versions is not guaranteed. Install only if your flake8 setup is stable and you accept the risk of no future updates.

Install

flake8-print on PyPI

pip

pip install flake8-print

uv

uv add flake8-print

poetry

poetry add flake8-print

Installing flake8-print

Before you install

Low install friction with only two runtime dependencies (flake8 and pycodestyle). However, the package is marked abandoned with no releases since 2022-04-30 and last commit on 2023-07-16, so maintenance support is not available.

License in practice

MIT license is permissive, allowing use in both open-source and proprietary projects with minimal restrictions.

Quickstart

pip install flake8-print

Then run flake8 normally; the plugin integrates automatically:
  $ flake8 your_file.py

Disable checks per-file in setup.cfg or .flake8:
  [flake8]
  per-file-ignores =
      scripts/*: T201,T203,T204

Requires flake8 to be installed; plugin only works as a flake8 extension, not standalone.

Verify before relying

  • Whether the plugin remains compatible with flake8 versions released after 2022-04-30.
  • Whether error code namespace change in 5.0.0 (T0* to T2*) affects existing flake8 configurations.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — flake8, pycodestyle
Maintenance abandoned — 1,567 days since the last release
Last repo commit
First released
Downloads 1,341,218/month — #4,029 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: flake8_print-5.0.0-py3-none-any.whl

Keywords: flake8, plugin, linting, print, code quality

Development Status :: 3 - AlphaEnvironment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Tags

flake8 print statement checkerdetect print statements lintingpython print call detectionflake8 plugin code qualitypprint detection linterprint statement linting tool
lintingflake8-plugincode-quality

More Python Modules packages