docformatter - Formats docstrings to follow Python PEP 257
(Documentation)
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
...]
- files
- files to format or '-' for standard in
- -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 --black option)
- --wrap-descriptions
length
- wrap descriptions at this length; set to 0 to disable wrapping (default:
72, 88 with --black option)
- --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)
- --range line
line
- apply docformatter to docstrings between these lines; line numbers are
indexed at 1 (default: None)
- --docstring-length
length 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