DOCFORMATTER(1)
β¨ NAME β¨
docformatter β okay bestie, it Formats docstrings to follow Python PEP 257 (Documentation) π that's literally the whole job and she does it flawlessly.
π DESCRIPTION π
So you run it like this:
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 ...]
Periodt. Now let's get into it π
πΈ positional arguments: πΈ
filesβ the files you wanna format, or'-'if you're feeding it from standard in π«Ά
π options: π
-h,--helpβ shows this help message and dips (exit) β¨-i,--in-placeβ actually edits your files instead of just printing diffs. main character move, no cap π₯-c,--checkβ only checks and reports back which files are formatted wrong. snitch mode but make it helpful π-d,--diffβ when you use it together with--checkor--in-place, it also says what changes would be made π-r,--recursiveβ drills down directories recursively, she goes deep π¦-e [EXCLUDE ...],--exclude [EXCLUDE ...]β in recursive mode, exclude directories and files by names π-n [NON-CAP ...],--non-cap [NON-CAP ...]β gives her a list of words NOT to capitalize when they show up as the first word in the summary π-s style,--style styleβ the docstring style to use when formatting parameter lists. One ofepytext,sphinx. (default:sphinx) π--rest-section-adorns REGEXβ regular expression for identifying reST section adornments (default:[!"#$%&'()*+,-./\:;<=>?@[]^_{|}~]{4,}`) β--blackβ makes formatting compatible with standardblackoptions (default:False) π€--wrap-summaries lengthβ wrap those long summary lines at this length; set it to0to disable wrapping entirely (default:79,88with the--blackoption) β¨--wrap-descriptions lengthβ wraps descriptions at this length; set to0to disable wrapping (default:72,88with the--blackoption) π--force-wrapβ forces descriptions to be wrapped even if it may result in a mess. brutal honesty from her (default:False) π--tab-width widthβ tabs in indentation count as this many characters when wrapping lines (default:1) π--blankβ adds a blank line after the description (default:False) π--pre-summary-newlineβ adds a newline before the summary of a multi-line docstring (default:False) π¦--pre-summary-spaceβ adds a space after the opening triple quotes (default:False) πΈ--make-summary-multi-lineβ adds a newline before AND after the summary of a one-line docstring (default:False) π--close-quotes-on-newlineβ places the closing triple quotes on a new line when a one-line docstring wraps to two or more lines (default:False) β¨--range line lineβ appliesdocformatterto docstrings between these lines; line numbers are indexed at1(default:None) π--docstring-length length lengthβ appliesdocformatterto docstrings within the 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 the file containingdocformatteroptions π--versionβ show the program's version number and exit π
okay quick vibe check fr fr: --force-wrap literally warns you it "may result in a mess" so don't come for her if it's messy π
That's the whole page bestie, slay πβ¨
This was docformatter 1.7.8, from April 2026, and yeah she's an icon in the DOCFORMATTER(1) manual, iykyk π«ΆπΈ
π¦ where this page comes from
- ubuntu stonking: python3-docformatter 1.7.8-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms