pydocstyle
Check Python docstring conventions
TLDR
Check docstrings
SYNOPSIS
pydocstyle [--convention name] [--ignore codes] [--select codes] [options] files
DESCRIPTION
pydocstyle checks Python docstring conventions. It enforces consistent documentation style.
Conventions define expected format. PEP 257, NumPy, and Google styles are supported.
Error codes identify specific issues. D100 series for modules, D200 for formatting, etc.
Source display shows problematic code. Helps identify and fix issues quickly.
Configuration files set project defaults. pyproject.toml and setup.cfg supported.
PARAMETERS
--convention NAME
Convention (pep257, numpy, google).--ignore CODES
Errors to ignore.--select CODES
Errors to check.--source
Show source code.--explain
Explain errors.--count
Count only.--match PATTERN
File pattern.--config FILE
Config file.
CONFIGURATION
pyproject.toml
Project configuration with a `[tool.pydocstyle]` section for convention, match patterns, and ignore/select rules.setup.cfg
Alternative project configuration with a `[pydocstyle]` section supporting the same options..pydocstyle
Standalone configuration file for pydocstyle settings.
CONVENTIONS
pep257 - PEP 257 conventions
numpy - NumPy docstring style
google - Google Python style
CAVEATS
Style preferences vary. May need tuning for project needs. Not all edge cases covered.
HISTORY
pydocstyle started as pep257 before expanding to support multiple conventions. It helps Python projects maintain consistent documentation.
