eradicate
eradicate removes commented-out code from Python files.
Introduction
With modern revision control available there is no reason to save junk comments to your repository. eradicate helps cleans up existing junk. It does this by first tokenizing the code to find the comments. It then removes the block comments that both contain valid Python syntax and have symbols unlikely to be real comment.
Example
$ eradicate --in-place example.py
Before:
#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)
After:
a = 4
def foo(x, y, z):
print(x, y, z)
Metadata
Release files for eradicate 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eradicate-0.0.5.tar.gz | 3.7 kB | Details |
Release files / eradicate-0.0.5.tar.gz
| Download URL | eradicate-0.0.5.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8921afbc6522f9819b7f0b2cc7f96a0237db7d1ab2bbb391e9da48a4d5f7069
|
|
BLAKE2b-256 checksum How to use checksums |
fb5224b886c9cf6d95a2791aefbb7538875a87cb3a56112426d38054317512be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |