docformatter1
Formats docstrings to follow python pep 257 (documentation)
Overview
usage: docformatter [-h] [-i | -c] [-d] [-r] [-e [EXCLUDE ...]]
- [-n [NON-CAP ...]] [-s [style]] [--rest-section-adorns REGEX]
-
[--black] [--wrap-summaries length] [--wrap-descriptions length] [--force-wrap] [--tab-width width] [--blank] [--pre-summary-newline] [--pre-summary-space] [--make-summary-multi-line] [--close-quotes-on-newline] [--range line line] [--docstring-length length length] [--non-strict] [--config CONFIG] [--version] files [files ...]
positional arguments:
- files
-
files to format or '-' for standard in
options:
-
-h, --help -
show this help message and exit
-
-i, --in-place -
make changes to files instead of printing diffs
-
-c, --check -
only check and report incorrectly formatted files
-
-d, --diff -
when used with `--check` or `--in-place`, also what changes would be made
-
-r, --recursive -
drill down directories recursively
-e[EXCLUDE ...],--exclude[EXCLUDE ...]-
in recursive mode, exclude directories and files by names
-n[NON-CAP ...],--non-cap[NON-CAP ...]-
list of words not to capitalize when they appear as the first word in the summary
-
-s style, --style style -
the docstring style to use when formatting parameter lists. One of epytext, sphinx. (default: sphinx)
-
--rest-section-adorns REGEX -
regular expression for identifying reST section adornments (default: [!"#$%&'()*+,-./\:;<=>?@[]^_`{|}~]{4,})
-
--black -
make formatting compatible with standard black options (default: False)
-
--wrap-summaries length -
wrap long summary lines at this length; set to 0 to disable wrapping (default: 79, 88 with
--blackoption)
-
--wrap-descriptions length -
wrap descriptions at this length; set to 0 to disable wrapping (default: 72, 88 with
--blackoption)
-
--force-wrap -
force descriptions to be wrapped even if it may result in a mess (default: False)
-
--tab-width width -
tabs in indentation are this many characters when wrapping lines (default: 1)
-
--blank -
add blank line after description (default: False)
-
--pre-summary-newline -
add a newline before the summary of a multi-line docstring (default: False)
-
--pre-summary-space -
add a space after the opening triple quotes (default: False)
-
--make-summary-multi-line -
add a newline before and after the summary of a one-line docstring (default: False)
-
--close-quotes-on-newline -
place closing triple quotes on a new-line when a one-line docstring wraps to two or more lines (default: False)
--rangeline line-
apply docformatter to docstrings between these lines; line numbers are indexed at 1 (default: None)
--docstring-lengthlength length-
apply docformatter to docstrings of given length range (default: None)
-
--non-strict -
don't strictly follow reST syntax to identify lists (see issue #67) (default: False)
-
--config CONFIG -
path to file containing docformatter options
-
--version -
show program's version number and exit
History
- Debian 13 (Trixie): the text shown here
- Debian 12 (Bookworm)
--black since Debian 13 (Trixie);
--close-quotes-on-newline since Debian 13 (Trixie);
--config since Debian 13 (Trixie);
--diff since Debian 13 (Trixie);
--non-strict since Debian 13 (Trixie);
--pre-summary-space since Debian 13 (Trixie);
--rest-section-adorns since Debian 13 (Trixie);
--style since Debian 13 (Trixie);
--tab-width since Debian 13 (Trixie);
-d since Debian 13 (Trixie);
-s since Debian 13 (Trixie).