Registry / testing / pydocstringformatter

pydocstringformatter

JSON →
library0.7.5pypypiunverified

pydocstringformatter is a tool that automatically formats Python docstrings, aiming to align them with recommendations from PEP 8 and PEP 257. It is currently at version 0.7.5 and maintains an active release cadence, with minor releases addressing bug fixes and improvements appearing every few weeks to months.

pip install pydocstringformatter
INSTALL
IMPORT
SIG · PYDOCSTRINGFORMATT
P
pydocstringformatter
testingpythonv0.7.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Run pydocstringformatter on a Python file to automatically format its docstrings. Use `--diff` to see changes without applying them, or run without to apply changes directly.

echo "def example_function():\n ''' A docstring. '''\n pass" > temp_module.py pydocstringformatter temp_module.py --diff pydocstringformatter temp_module.py cat temp_module.py rm temp_module.py
pydocstringformatter --version
Debug
Known issues
gotchaVersion 0.7.4 was never released on PyPI. Users attempting to install or pin to this specific version will encounter a 'No matching distribution found' error.
fix
Install the latest available version (0.7.5 or higher) or a previous stable release (e.g., 0.7.3).
affects: All versions
breakingThe `--style` option, which allows selecting a specific docstring style (e.g., `numpydoc`), was introduced in v0.7.0. Older versions do not support this argument.
fix
Upgrade to version 0.7.0 or higher to utilize the `--style` option: `pip install --upgrade pydocstringformatter`.
affects: <0.7.0
gotchaPrior to version 0.7.0 and 0.6.2, there were several fixes related to incorrect parsing of values in `pyproject.toml`. This could lead to configuration not being applied as expected.
fix
Ensure you are using pydocstringformatter version 0.7.0 or newer for more robust `pyproject.toml` parsing and configuration application. If issues persist, double-check TOML syntax.
affects: <0.7.0
gotchaSpecific formatting rules for styles like numpydoc (e.g., section ordering, name/type spacing) were added in v0.7.0. Older versions will not apply these specific rules.
fix
Upgrade to pydocstringformatter v0.7.0 or later to benefit from enhanced numpydoc style formatting features.
affects: <0.7.0
Errors
Common errors & fixes
IndexError: string index out of range
This error often occurs when processing almost empty docstrings or docstrings with specific problematic structures, particularly with single-line summaries.
fix
Upgrade to version 0.7.3 or higher. Versions 0.7.2 and 0.7.3 specifically addressed crashes with almost empty docstrings and empty summaries.
Error: No such option: --style
You are attempting to use the `--style` option, but your installed version of pydocstringformatter is too old.
fix
Upgrade to pydocstringformatter version 0.7.0 or newer: `pip install --upgrade pydocstringformatter`.
Configuration specified in pyproject.toml is not being applied
Older versions of pydocstringformatter had bugs in parsing `pyproject.toml` configuration, leading to settings being ignored.
fix
Upgrade to pydocstringformatter version 0.7.0 or newer. Also, verify that your `pyproject.toml` adheres to the TOML specification and the tool's expected configuration structure (e.g., `[tool.pydocstringformatter]`).
Upgrade
Version history
0.7.5latest on PyPI · released Jul 12, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
pydocstringformatter — pip install pydocstringformatter · libregistry