flake8-print

5.0.0 · active · verified Sat Apr 11

Flake8 print plugin. This module provides a plugin for flake8, the Python code checker, specifically designed to identify and flag the use of `print` statements in Python files. The current version is 5.0.0, and it has a moderate release cadence with several updates per year, including major versions for significant changes.

Warnings

Install

Imports

Quickstart

After installing `flake8` and `flake8-print`, save the code above to a file (e.g., `example.py`). Run `flake8 example.py` from your terminal. Flake8 will report T201 errors for the detected `print` statements. The second `print` statement includes a `# noqa: T201` comment to explicitly ignore the `flake8-print` warning on that line.

print('This line will be flagged by flake8-print')

# To demonstrate ignoring a specific print statement:
import os
if os.environ.get('DEBUG_MODE', 'False') == 'True':
    print('Debug message') # noqa: T201

view raw JSON →