Scroll to navigation

DOCFORMATTER(1) User Commands DOCFORMATTER(1)

NAME

docformatter - Formats docstrings to follow Python PEP 257 (Documentation)

DESCRIPTION

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 to format or '-' for standard in

options:

show this help message and exit
make changes to files instead of printing diffs
only check and report incorrectly formatted files
when used with `--check` or `--in-place`, also what changes would be made
drill down directories recursively
in recursive mode, exclude directories and files by names
list of words not to capitalize when they appear as the first word in the summary
the docstring style to use when formatting parameter lists. One of epytext, sphinx. (default: sphinx)
regular expression for identifying reST section adornments (default: [!"#$%&'()*+,-./\:;<=>?@[]^_`{|}~]{4,})
make formatting compatible with standard black options (default: False)
wrap long summary lines at this length; set to 0 to disable wrapping (default: 79, 88 with --black option)
wrap descriptions at this length; set to 0 to disable wrapping (default: 72, 88 with --black option)
force descriptions to be wrapped even if it may result in a mess (default: False)
tabs in indentation are this many characters when wrapping lines (default: 1)
add blank line after description (default: False)
add a newline before the summary of a multi-line docstring (default: False)
add a space after the opening triple quotes (default: False)
add a newline before and after the summary of a one-line docstring (default: False)
place closing triple quotes on a new-line when a one-line docstring wraps to two or more lines (default: False)
apply docformatter to docstrings between these lines; line numbers are indexed at 1 (default: None)
apply docformatter to docstrings of given length range (default: None)
don't strictly follow reST syntax to identify lists (see issue #67) (default: False)
path to file containing docformatter options
show program's version number and exit
September 2023 docformatter 1.7.5