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 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)
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.0.4.tar.gz
(3.5 kB
view details)
File details
Details for the file eradicate-0.0.4.tar.gz
.
File metadata
- Download URL: eradicate-0.0.4.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32300cc78add9f6778d43c4a0bc484cc13fb7be74e5ad0e7b277d424270c0991 |
|
MD5 | 3e4ed3e5d5b5c8cc9516c2070955886d |
|
BLAKE2b-256 | 0f8be4fcc00be6068285cba6ffd1ade94fbaf6ead61ca466bc606d6aa573bce2 |