docformatter 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.
- Unless the entire docstring fits on a line, place 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.
docformatter formats docstrings compatible with black when passed the --black
option.
docformatter formats field lists that use Epytext or Sphinx styles.
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py311-docformatter listed in the above command, you can pick from the names under the Packages section.
===> The following configuration options are available for py311-docformatter-1.7.8:
TOMLI=on: TOML (Tom's Obvious Minimal Language) support
===> Use 'make config' to modify these settings
Mk/Uses/python.mk: Introduce PY_TOMLI
- Convert ports to use PY_TOMLI to simplify Makefile.
The minimal version is set to 2.0.1 because it is required by multiple ports
such as devel/py-poetry.
The upper bound of version is set to 3 because it is limited by devel/py-poetry.
With hat: python
devel/py-docformatter: Add py-docformatter 1.7.5
docformatter 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.
- Unless the entire docstring fits on a line, place 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.
docformatter formats docstrings compatible with black when passed the --black
option.
docformatter formats field lists that use Epytext or Sphinx styles.