Flake8 plugin to find commented out code
Project description
flake8-eradicate
flake8
plugin to find commented out (or so called "dead") code.
This is quite important for the project in a long run.
This tool is based on eradicate
project.
Installation
pip install flake8-eradicate
Usage
Run your flake8
checker as usual.
Commented code should raise an error.
We prefer not to raise a warning than to raise a false positive.
So, we ignore --aggressive
option from eradicate
.
Error codes
Error code | Description |
---|---|
E800 | Found commented out code |
Output example
» flake8 tests/fixtures/incorrect.py
tests/fixtures/incorrect.py:1:1: E800: Found commented out code:
--- before/tests/fixtures/incorrect.py
+++ after/tests/fixtures/incorrect.py
@@ -1,16 +1,10 @@
class Some(object):
- # property_name = 1
other_property = 2
-# def function_name():
-# return None
-# class CommentedClass(object):
# def __init__(self) -> None:
-# self.property = None
# def __str__(self) -> str:
-# return self.__class__.__name__
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flake8-eradicate-0.1.1.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for flake8_eradicate-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83dfeb5980ada63a73ccdfe64f233fc7ddf9ea702299b9f599dad9c2adc9036e |
|
MD5 | 438c937e58665b02fd71a2911f960417 |
|
BLAKE2b-256 | 954bfe799efbef379635660a571d7e1c004f918954198a2ed2194ce243aae69e |