PyCQA / docformatter

Formats docstrings to follow PEP 257
https://pypi.python.org/pypi/docformatter
MIT License
524 stars 61 forks source link

feat: wrap Sphinx style long parameter descriptions #201

Closed weibullguy closed 1 year ago

weibullguy commented 1 year ago

Adds new argument --style to direct docformatter to wrap long parameter descriptions that exceed wrap length. Only "Sphinx" style parameter lists are recognized. NumPy and Google style parameter lists still result in existing behavior of not wrapping the long description (this PR sets the framework to add those styles).

Sphinx style parameter lists are in the format:

:param str arg1: A string argument.
:param int arg2: An integer argument.
:return something_good: The return value.
:rtype: bool

This PR will be merged following release of v1.7.0.

Closes #58 Closes #68