Skip to main content

Removes commented-out code.

Project description

Build status

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


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

Uploaded Source

File details

Details for the file eradicate-0.0.5.tar.gz.

File metadata

  • Download URL: eradicate-0.0.5.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for eradicate-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a8921afbc6522f9819b7f0b2cc7f96a0237db7d1ab2bbb391e9da48a4d5f7069
MD5 7f9604ed07e5a6b03fd3481222bcc103
BLAKE2b-256 fb5224b886c9cf6d95a2791aefbb7538875a87cb3a56112426d38054317512be

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