Skip to main content

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. Based on eradicate project.

wemake.services Build Status Coverage Python Version PyPI version

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


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.2.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

flake8_eradicate-0.2.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file flake8-eradicate-0.2.0.tar.gz.

File metadata

  • Download URL: flake8-eradicate-0.2.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.6.5 Darwin/18.2.0

File hashes

Hashes for flake8-eradicate-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c762fbb5c3e3694c9ba656d38477b2dcca6599b8baeee4984d05d655591a6f83
MD5 be5cca7ba2c818780093d5970580cc6c
BLAKE2b-256 e788d23b6b6630b578e9a6f0f36c9bc8ee3384ef1e14f6e91baab963c417a56b

See more details on using hashes here.

File details

Details for the file flake8_eradicate-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_eradicate-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0953cd3bcae4bfd04d45075234e0b5fd465ff50ecc56cdcaf0027da751632127
MD5 73eec36de181298481a6a6b2a6360f98
BLAKE2b-256 2f5e9e38331c039c7821137f78d9960e61683351675cf01134e57dc66f1e3ada

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page