Skip to main content

Flake8 plugin to find commented out code

Project description


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. Build Status Coverage Python Version PyPI version


pip install flake8-eradicate


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/
tests/fixtures/ E800: Found commented out code:
--- before/tests/fixtures/
+++ after/tests/fixtures/
@@ -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:
-# = None

 #     def __str__(self) -> str:
-#         return self.__class__.__name__



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-eradicate, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size flake8_eradicate-0.1.1-py3-none-any.whl (5.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flake8-eradicate-0.1.1.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page