A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257.
Maintained. Last release 5 months ago, commits in 17 of the last 26 weeks. Weaker on release cadence and contributor spread.
pip install pydocstringformatterPydocstringformatter
A tool to automatically format Python docstrings to follow recommendations from
PEP 8 and
PEP 257 (or other supported style
guides.)
See What it does for currently supported auto-formatting.
Rationale
This project is heavily inspired by
docformatter.
When this project was started docformatter did not meet all of the requirements the
pylint project had for its docstring formatter and
was no longer actively maintained (this has changed since then). Therefore, some
contributors of pylint got together and started working on our own formatter to
fulfill our needs.
When asked we defined the objective of the tool as:
"A docstring formatter that follows PEP8 and PEP257 but makes some of the more 'controversial' elements of the PEPs optional"
See the original answer.
As such, the biggest difference between the two is that fixes some of the open issues we found in . In general, the output of both formatters (and any other docstring formatter) should be relatively similar.