flake8-eradicate
v1.5.0Flake8 plugin to find commented out code
5 KB Python 3.8+ py3-none-anyMIT License3 deps Likely Unmaintained
$ uv add flake8-eradicateflake8-eradicate
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-aggressiveto enable aggressive mode fromeradicate, can lead to false positives--eradicate-whitelistto overwrite the whitelist fromeradicate(#separated list)--eradicate-whitelist-extendto extend the whitelist fromeradicate(#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):

License
MIT.
Details
- Version
- 1.5.0
- License
- MIT License
- Python
- >=3.8,<4.0
- Maintainer
- Nikita Sobolev
Maintainers
- Nikita Sobolev · [email protected]