Awesome Open Source
Awesome Open Source

flake8-eradicate 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.


pip install flake8-eradicate

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


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




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



Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (54,340
linter (243
code-quality (85
comments (44
flake8 (23