Removes commented-out code.
Project description
eradicate removes commented-out code from Python files.
Introduction
With modern revision control available, there is no reason to save commented-out code to your repository. eradicate helps cleans up existing junk comments. It does this by detecting block comments that contain valid Python syntax that are likely to be commented out code. (It avoids false positives like the sentence this is not good, which is valid Python syntax, but is probably not code.)
Example
$ eradicate --in-place example.py
Before running eradicate.
#import os
#from foo import junk
#a = 3
a = 4
#foo(1, 2, 3)
def foo(x, y, z):
#print('hello')
print(x, y, z)
# This is a real comment.
#return True
return False
After running eradicate.
a = 4
def foo(x, y, z):
print(x, y, z)
# This is a real comment.
return False
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
eradicate-0.1.2.tar.gz
(4.2 kB
view details)
File details
Details for the file eradicate-0.1.2.tar.gz
.
File metadata
- Download URL: eradicate-0.1.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3103e7f9f8c7ac30cad49e367e4540658b14f805ef2a50c072c2431ed8e63876 |
|
MD5 | 33df882b2a9c9bedc91809d5d3726e4d |
|
BLAKE2b-256 | 4638b34c7842e836d3101d82733827bee1ad588254af98e25f5966994679823e |