Flake8 plugin to find commented out code
Project Links
Meta
Author: Nikita Sobolev
Requires Python: >=3.8,<4.0
Classifiers
Development Status
- 5 - Production/Stable
Environment
- Console
Framework
- Flake8
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python :: 3
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
Topic
- Software Development :: Libraries :: Python Modules
- Software Development :: Quality Assurance
flake8-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-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 codes
Error code | Description |
---|---|
E800 | Found commented out code |
Output example
Here's how output looks like (we are using wemake
formatter):
License
MIT.
May 31, 2023
1.5.0
Sep 20, 2022
1.4.0
Aug 11, 2022
1.3.0
Apr 26, 2022
1.2.1
Oct 19, 2021
1.2.0
Jun 22, 2021
1.1.0
Oct 12, 2020
1.0.0
Jun 04, 2020
0.4.0
Mar 12, 2020
0.3.0
Dec 18, 2019
0.2.4
Oct 16, 2019
0.2.3
Sep 27, 2019
0.2.2
Jul 18, 2019
0.2.1
Dec 24, 2018
0.2.0
Sep 26, 2018
0.1.1
Sep 21, 2018
0.1.0