Skip to main content

A utility to remove all docstrings from your project

Project description

strip-docs

PyPI PyPI version PyPI Maintainability Wheel Build status

A Python utility to remove all docstrings from your modules before shipping

Info-anarchized from this Stack Overflow post

Usage

Just install it via pip

pip install strip-docs

And then launch it on any list of files or directories that you would like to see the docstrings gone, this way:

strip-docs dir1 dir2 file1 file2 ...

All .py, .pyx and .pxd files will be processed.

If you specify a single file, it will be processed

Caveats

Try to avoid writing empty classes or routines like this:

def empty_routine():
    """I am an empty routine"""

Because the syntax itself is not analyzed, this will result in a Python SyntaxError.

Better write this:

def empty_routine():
    """I am an empty routine"""
    ...

So after trimming the docstrings it remains valid Python.

Project details


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

strip_docs-1.0a1-py2.py3-none-any.whl (3.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file strip_docs-1.0a1-py2.py3-none-any.whl.

File metadata

  • Download URL: strip_docs-1.0a1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.0

File hashes

Hashes for strip_docs-1.0a1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ec3df1b889a3b40b9ca0dff2ccd3a9620d5181e3bdc6f24c95a12022cd5bd699
MD5 ba45ab9641e807824b4e5975b12b0762
BLAKE2b-256 36feec789f13278ddd32111b9ed174f792ee7ede5fe1095cd966b59eeb4566dd

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