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.
Example:
flake8 your_module.py
--eradicate-aggressive
to enable aggressive mode fromeradicate
, can lead to false positives--eradicate-whitelist
to overwrite the whitelist fromeradicate
(#
separated list)--eradicate-whitelist-extend
to extend the whitelist fromeradicate
(#
separated list)
Error code | Description |
---|---|
E800 | Found commented out code |
Here's how output looks like (we are using wemake
formatter):
MIT.