Skip to main content

A CLI tool to clean up your Python comments

Project description

Cleany

tests GitHub issues last-commit Supported Versions

A CLI tool to clean up your Python comments

Install

Install via pip

$ pip install cleany

Invoke

Cleany is a command line tool. Once installed, invoke it from the command line:

$ cleany
> cleany -h for help

Remove all comments

$ cleany --nuke

Remove emojis only:

$ cleany --emoji

Change the path.

Cleany will search for .py files starting in your current directory and moving recursively down. If you would like to specify a directory, use --path:

$ cleany --nuke --path some-directory

Ignore directory

If you want Cleany to skip a directory, use --ignore-dir:

$ cleany --emoji --ignore-dir some-directory

You can ignore multiple directories:

$ cleany --emoji --ignore-dir some-directory --ignore-dir another-directory

Ignore file

If you want Cleany to skip a file, use --ignore-file:

$ cleany --nuke --ignore-file some_file.py

You do not need to include the full path to the file; just use the file name. Cleany will find and skip any file with that name.

Surpress Cleany's output

By default Cleany will provide output about the files it's cleaning up.

$ cleany --nuke
> ----- scanning comments in /src/main.py -----
> removing comment from line 85 of /src/main.py
> removing comment from line 115 of /src/main.py
> removed 2 comments from /src/main.py

If you want to surpress that output, use --quiet:

$ cleany --nuke --quiet
$ 

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

cleany-0.2.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

cleany-0.2.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file cleany-0.2.2.tar.gz.

File metadata

  • Download URL: cleany-0.2.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cleany-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0dbef219afb7e5d1ba7e40c920b7ff76557012566a97ebf6f4c8d40e6d4da574
MD5 c74b5f449d26ccdbff1a64a979b0cfef
BLAKE2b-256 3a9a83336282875c1409f822804b95cdc3fbf93dacb5076c2ece058f37fff524

See more details on using hashes here.

Provenance

The following attestation bundles were made for cleany-0.2.2.tar.gz:

Publisher: cleany.yml on weddleben/cleany

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cleany-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: cleany-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cleany-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f4cf4cfa6aa406a62b8087cc45d79824eb6999389a29e10aa345de0d83c067f1
MD5 dee8d35c9deb0b4ed0124b2c5b968313
BLAKE2b-256 5ae8879af2d0d7d3c57b8a08b783912d80faf0de1aed885d2fc6a711c47d6404

See more details on using hashes here.

Provenance

The following attestation bundles were made for cleany-0.2.2-py3-none-any.whl:

Publisher: cleany.yml on weddleben/cleany

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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