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 filesprune prints- Remove print statements from Python filesprune docstrings- Remove docstrings from Python filesprune asserts- Remove assert statements from Python filesprune 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
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prune_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prune_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b5494dfe4099019615d3b7ff46cc782aaeaa41845d799cbbef89d4adf91b57f
|
|
| MD5 |
b12dd18347f981a02cfb3640cdc0a5ff
|
|
| BLAKE2b-256 |
969d55120721ab4915be28eb17726aece79f4dee1e6cf2f19cb6b6a5620236a6
|