{"id":8478,"library":"pydocstringformatter","title":"pydocstringformatter","description":"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.","status":"active","version":"0.7.5","language":"en","source_language":"en","source_url":"https://github.com/DanielNoord/pydocstringformatter","tags":["docstrings","formatter","linter","code quality","pep8","pep257"],"install":[{"cmd":"pip install pydocstringformatter","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[],"quickstart":{"code":"echo \"def example_function():\\n    ''' A docstring. '''\\n    pass\" > temp_module.py\npydocstringformatter temp_module.py --diff\npydocstringformatter temp_module.py\ncat temp_module.py\nrm temp_module.py","lang":"bash","description":"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."},"warnings":[{"fix":"Install the latest available version (0.7.5 or higher) or a previous stable release (e.g., 0.7.3).","message":"Version 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.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to version 0.7.0 or higher to utilize the `--style` option: `pip install --upgrade pydocstringformatter`.","message":"The `--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.","severity":"breaking","affected_versions":"<0.7.0"},{"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.","message":"Prior 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.","severity":"gotcha","affected_versions":"<0.7.0"},{"fix":"Upgrade to pydocstringformatter v0.7.0 or later to benefit from enhanced numpydoc style formatting features.","message":"Specific 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.","severity":"gotcha","affected_versions":"<0.7.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"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.","cause":"This error often occurs when processing almost empty docstrings or docstrings with specific problematic structures, particularly with single-line summaries.","error":"IndexError: string index out of range"},{"fix":"Upgrade to pydocstringformatter version 0.7.0 or newer: `pip install --upgrade pydocstringformatter`.","cause":"You are attempting to use the `--style` option, but your installed version of pydocstringformatter is too old.","error":"Error: No such option: --style"},{"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]`).","cause":"Older versions of pydocstringformatter had bugs in parsing `pyproject.toml` configuration, leading to settings being ignored.","error":"Configuration specified in pyproject.toml is not being applied"}]}