pydoclint
A Python docstring linter that checks arguments, returns, yields, and raises sections
What it is and what it does
Pydoclint is a command-line docstring linter that parses function signatures and implementations, then checks whether the docstring's documented sections (parameters, return values, exceptions) are accurate and complete. It supports three major docstring conventions—numpy, Google, and Sphinx—and can run as a standalone tool, a flake8 plugin, or a pre-commit hook. The package is designed for speed and can process large codebases in seconds rather than minutes or hours.
The linter detects mismatches between what a function actually does and what its docstring claims: missing or undocumented parameters, incorrect return type documentation, and unhandled exceptions. It complements pydocstyle (which checks formatting and structure) rather than replacing it. Configuration is flexible, supporting inline suppression via `# noqa` comments, baseline generation for gradual adoption, and multiple style options. The tool requires Python 3.10 or higher and depends on click, docstring_parser_fork, and tomli.
Use it for:
- Enforce consistent docstring quality across a team's codebase by catching mismatches between function signatures and their documentation.
- Integrate docstring linting into CI/CD pipelines via flake8 or pre-commit hooks to catch documentation drift before code review.
- Gradually adopt strict docstring standards in legacy projects using the baseline feature to log existing violations without blocking new commits.
- Validate that all function parameters, return values, and exceptions are properly documented in numpy, Google, or Sphinx style.
- Speed up large-scale docstring audits on projects like numpy or scikit-learn where traditional linters would take hours.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pydoclint is a Python docstring linter that validates whether docstring sections (arguments, returns, raises) match the function signature and implementation, supporting numpy, Google, and Sphinx styles.
Yes. Pydoclint is actively maintained, has no known vulnerabilities, installs with minimal friction, and is permissively licensed. It fills a clear need for fast, accurate docstring linting across multiple styles. Install it if your team values documentation consistency and wants to catch docstring-signature mismatches automatically; the speed advantage over alternatives like darglint is substantial for large codebases.
Install
pydoclint on PyPI
pip
pip install pydoclintuv
uv add pydoclintpoetry
poetry add pydoclintInstalling pydoclint
Before you install
Low install friction with three lightweight runtime dependencies (click, docstring_parser_fork, tomli). Active maintenance with a release 42 days ago and 220 repository stars. Requires Python 3.10 or higher.
License in practice
MIT license (permissive) allows use in commercial and private projects with minimal restrictions; attribution is required but no copyleft obligations apply.
Quickstart
pip install pydoclint
pydoclint <FILE_OR_FOLDER>
# Or as a flake8 plugin:
pip install pydoclint[flake8]
flake8 --select=DOC <FILE_OR_FOLDER>
Requires Python 3.10 or higher; Python 3.8 and 3.9 are not supported.
Verify before relying
- Whether the package's claimed performance advantage (thousands of times faster than darglint) holds across typical project sizes and configurations.
- How well the three supported docstring styles (numpy, Google, Sphinx) cover real-world codebases and whether style deviations are acceptable for your team.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — click, docstring_parser_fork, tomli |
| Maintenance | actively maintained — 42 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 872,369/month — #4,844 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pydoclint-0.9.1-py3-none-any.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
darglintDarglint is a docstring linter that checks…
permissive · top 15,000 on PyPI
pydocstylepydocstyle is a static analysis tool that…
permissive · top 5,000 on PyPI
flake8-docstringsIntegrates pydocstyle docstring checking into…
permissive · top 5,000 on PyPI
flake8-rst-docstringsA flake8 plugin that validates Python…
permissive · top 15,000 on PyPI
docsigLints Python function and method signatures to…
permissive · top 15,000 on PyPI
numpydocA Sphinx extension that parses and renders…
permissive · top 5,000 on PyPI
yamllintyamllint checks YAML files for syntax errors,…
copyleft · top 1,000 on PyPI
tclinttclint is a CLI linter, formatter, and language…
permissive · top 15,000 on PyPI
sphinx-lintSphinx Lint checks reStructuredText and Python…
permissive · top 15,000 on PyPI
pylamaPylama is a code audit tool that wraps multiple…
permissive · top 15,000 on PyPI