Package Info

python-docformatter


Utility to re-format docstrings per PEP 257


Development/Languages/Python

Docformatter currently automatically formats docstrings to follow a subset of the PEP 257 conventions. Below are the relevant items quoted from PEP 257.

  • For consistency, always use triple double quotes around docstrings.
  • Triple quotes are used even though the string fits on one line.
  • Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description.
  • The BDFL recommends inserting a blank line between the last paragraph in a multi-line docstring and its closing quotes, placing the closing quotes on a line by themselves.

docformatter also handles some of the PEP 8 conventions.

  • Don't write string literals that rely on significant trailing whitespace. Such trailing whitespace is visually indistinguishable and some editors (or more recently, reindent.py) will trim them.

License: MIT
URL: https://github.com/myint/docformatter

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
1.1-bp155.2.9 info GA Release 2023-05-22 15 SP5
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python3-docformatter
1.1-bp154.1.17 info GA Release 2022-05-09 15 SP4
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python3-docformatter
1.1-bp153.1.14 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python2-docformatter
  • python3-docformatter
1.1-bp152.3.16 info GA Release 2020-04-17 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python2-docformatter
  • python3-docformatter
1.1-bp151.1.1 info GA Release 2019-06-18 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python2-docformatter
  • python3-docformatter