pydoctest is a tool to validate that Python docstrings (reStructuredText, Google, or NumPy style) match the actual function and method signatures. It checks type annotations in docstrings against the real types, flagging mismatches. Current version 0.2.1, supports Python >=3.6, and is in active maintenance mode with periodic updates.
pip install pydoctestVerified import paths — ran on the pinned version, not inferred.
Basic usage: call pydoctest.run() to validate all Python files in cwd, or specify paths.
Use one of the supported styles; check documentation for style detection.
Update docstrings to use Optional[X] explicitly instead of '(optional)' marker.
Use exclude_paths instead of exclude in function calls and CLI.
Ensure docstrings are in reStructuredText, Google, or NumPy style. If custom, provide a custom parser.
Verify that include_paths point to existing Python files with .py extension.
No dependency data recorded yet.