Flake8 plugin to find commented out or dead code https://pypi.org/project/flake8-eradicate/
Find a file
2026-05-05 17:29:00 +02:00
.github Update test.yml 2025-05-21 19:30:58 +02:00
tests Version 1.5.0 (#294) 2023-05-31 12:56:43 +03:00
.editorconfig Initial release 2018-09-21 11:18:55 +03:00
.gitignore Initial release 2018-09-21 11:18:55 +03:00
CHANGELOG.md Version 1.5.0 (#294) 2023-05-31 12:56:43 +03:00
CONTRIBUTING.md Fix mypy command in CONTRIBUTING.md (#107) 2019-12-18 01:17:38 +03:00
eradicate.png Add files via upload 2019-07-19 10:34:27 +03:00
flake8_eradicate.py Version 1.5.0 (#294) 2023-05-31 12:56:43 +03:00
LICENSE Initial commit 2018-09-21 09:58:51 +03:00
poetry.lock Remove upper bounds from required python version 2026-05-05 17:29:00 +02:00
pyproject.toml Remove upper bounds from required python version 2026-05-05 17:29:00 +02:00
README.md Update link 'wemake-python-stylegui.de' -> 'wemake-python-styleguide.rtfd.io' (#296) 2024-01-02 15:55:10 +03:00
setup.cfg Version 1.4.0 (#268) 2022-09-20 23:00:49 +03:00

flake8-eradicate

wemake.services Build Status codecov Python Version PyPI version wemake-python-styleguide

flake8 plugin to find commented out (or so called "dead") code.

This is quite important for the project in a long run. Based on eradicate project.

Installation

pip install flake8-eradicate

It is also a valuable part of wemake-python-styleguide.

Usage

Run your flake8 checker as usual. Commented code should raise an error.

Example:

flake8 your_module.py

Options

  • --eradicate-aggressive to enable aggressive mode from eradicate, can lead to false positives
  • --eradicate-whitelist to overwrite the whitelist from eradicate (# separated list)
  • --eradicate-whitelist-extend to extend the whitelist from eradicate (# separated list)

Error codes

Error code Description
E800 Found commented out code

Output example

Here's how output looks like (we are using wemake formatter):

flake8-eradicate output

License

MIT.