Skip to main content

Black for Python Docstrings and reStructuredText (rst)

Project description

Style-Doc

Style-Doc is Black for Python Docstrings and reStructuredText. It can be used to format docstrings (Google docstring format) in Python files or reStructuredText.

This work is based on the style_doc.py script from The HuggingFace Inc. team.

Installation

Style-Doc is available at the Python Package Index (PyPI). It can be installed with pip:

$ pip install style-doc

Usage

$ style-doc --help
usage: style-doc [-h] [--max_len MAX_LEN] [--check_only] [--py_only]
                 [--rst_only]
                 files [files ...]

positional arguments:
  files              The file(s) or folder(s) to restyle.

optional arguments:
  -h, --help         show this help message and exit
  --max_len MAX_LEN  The maximum length of lines.
  --check_only       Whether to only check and not fix styling issues.
  --py_only          Whether to only check py files.
  --rst_only         Whether to only check rst files.

Licensing

Copyright (c) 2020 The HuggingFace Inc. team
Copyright (c) 2021 Philip May, Deutsche Telekom AG

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the 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

style_doc-0.0.1.dev2.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

style_doc-0.0.1.dev2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file style_doc-0.0.1.dev2.tar.gz.

File metadata

  • Download URL: style_doc-0.0.1.dev2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for style_doc-0.0.1.dev2.tar.gz
Algorithm Hash digest
SHA256 af56f04076cc88917f7e0e12f939f2f44a96f514b812b6eaad059e7331c30d1c
MD5 39b7dbb86470db4083b4c70d93bc7e00
BLAKE2b-256 4c8ce93b3c89b2ed9b57688f54517fe6e37fb670df9cc57e3c26ab6c77ca0b91

See more details on using hashes here.

Provenance

File details

Details for the file style_doc-0.0.1.dev2-py3-none-any.whl.

File metadata

  • Download URL: style_doc-0.0.1.dev2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for style_doc-0.0.1.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa427776f1e3c26c542eb6f65423810276f59085a8e82df1e033850e3b3b4fa1
MD5 da13888e7f52c62a88319ecf2cf36ba3
BLAKE2b-256 884b46677c53f21dbecc1a04e860bbfaf5a12ce34b19bd77c5cdfe2566b7fe72

See more details on using hashes here.

Provenance

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