Closed jamesbraza closed 2 months ago
Per PEP-257:
Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description.
And and one-line docstring, per PEP-257:
The docstring is a phrase ending in a period. It prescribes the function or method’s effect as a command (“Do this”, “Return that”), not as a description; e.g. don’t write “Returns the pathname …”.
The example you provide is a multi-line docstring per PEP-257 and is being handled appropriately.
Please see the below Python snippet, I am using Python 3.11 with
docformatter==1.7.5
:Running
docformatter --black --close-quotes-on-newline a.py
formats it to:I understand why the summary line is being split, because it violates the 88-char summary wrap length. However, I would like
docformatter
to avoid splitting the summary into a description like so:I think what this warrants is:
--no-split-summary-description
or--no-split-first-sentence
\n