Skip to main content

eradicate

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)

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)

Source distribution for eradicate 0.0.5
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

Release history Release notifications | RSS feed

3.0.1

2 release files

3.0.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

1 release file

1.0

1 release file

0.2.1

1 release file

0.2

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page