docformatter(1)

Formats docstrings to follow Python PEP 257 (Python 3)

Section 1 python3-docformatter bookworm source

Description

DOCFORMATTER

NAME

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

DESCRIPTION

usage: docformatter [-h] [-i | -c] [-r] [-e [EXCLUDE ...]]
[--wrap-summaries length] [--wrap-descriptions length]

[--blank] [--pre-summary-newline] [--make-summary-multi-line] [--force-wrap] [--range line line] [--docstring-length length length] [--version] files [files ...]

Formats docstrings to follow PEP 257.

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

-r, --recursive

drill down directories recursively

-e [EXCLUDE ...], --exclude [EXCLUDE ...]

exclude directories and files by names

--wrap-summaries length

wrap long summary lines at this length; set to 0 to disable wrapping (default: 79)

--wrap-descriptions length

wrap descriptions at this length; set to 0 to disable wrapping (default: 72)

--blank

add blank line after description

--pre-summary-newline

add a newline before the summary of a multi-line docstring

--make-summary-multi-line

add a newline before and after the summary of a oneline docstring

--force-wrap

force descriptions to be wrapped even if it may result in a mess

--range line line

apply docformatter to docstrings between these lines; line numbers are indexed at 1

--docstring-length length length

apply docformatter to docstrings of given length

--version

show program’s version number and exit