Skip to main content

A CLI tool named prune for cleaning Python code

Project description

prune

A CLI tool named prune for cleaning Python code.

Installation

pip install prune-cli

Usage

prune <command> [options]

Commands

  • prune comments - Remove comments from Python files
  • prune prints - Remove print statements from Python files
  • prune docstrings - Remove docstrings from Python files
  • prune asserts - Remove assert statements from Python files
  • prune logs - Remove logging statements from Python files

Examples

# Remove all print statements
prune prints

# Remove inline comments only (preserve noqa, type:, pragma)
prune comments --default

# Remove all types of comments
prune comments --all

# Remove specific log levels
prune logs --debug --info --error

# Remove all log levels
prune logs --all

# Show per-file details (verbose is default)
prune prints

# Suppress per-file output
prune prints --quiet

Development

This project uses a src-layout packaging structure.

Requirements

  • Python >= 3.11
  • LibCST

License

MIT License

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

prune_cli-0.1.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prune_cli-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file prune_cli-0.1.1.tar.gz.

File metadata

  • Download URL: prune_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for prune_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5ad1fe72d88c65bfcb4b598a328a6a4184c959a23141f8bb282549676672171c
MD5 77018bfacc496c9be604260ba8b8ee3b
BLAKE2b-256 a2e6710071ed906f172cfc3399edd4bdd4f147ba50cad9766285b1d7e82a8d50

See more details on using hashes here.

File details

Details for the file prune_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: prune_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for prune_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03e4f439fd66f9398fd548c3833de09510b0068f6cf9939fb2a77509901ff275
MD5 8e3194294ea7ad5a24a21aa9398a7d30
BLAKE2b-256 4a86338cc23db0865c5aff84a70a91d46d9cff47951b12284fd98a6e8001f046

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page