darglint
A utility for ensuring Google-style docstrings stay up to date with the source code.
What it is and what it does
Darglint is a linter that validates whether docstrings accurately describe the functions and methods they document. It parses docstrings in Google, Sphinx, or Numpy style and compares them against the actual code—checking that documented parameters, return types, exceptions, and yields match what the implementation actually does. The tool runs from the command line and can be configured to ignore specific errors, adjust strictness levels (short/long/full), and customize error message formats.
The project is currently in maintenance mode: the original maintainer no longer works with Python regularly and is not adding significant new features, though bug fixes and pull requests are still accepted. It has no runtime dependencies, making installation straightforward. The tool is useful for teams that want to enforce documentation accuracy as part of their code quality pipeline, though ongoing maintenance and feature development should not be expected.
Use it for:
- Enforce that docstrings document all function parameters and return values before code review.
- Catch outdated docstrings when function signatures change during refactoring.
- Validate exception documentation matches the actual exceptions a function can raise.
- Integrate into CI/CD pipelines to fail builds when docstrings drift from implementation.
- Configure strictness levels to allow simple one-liners while fully checking complex functions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Darglint is a docstring linter that checks whether function and method docstrings match their actual implementation, supporting Google, Sphinx, and Numpy style formats.
Yes, if you need docstring validation and accept maintenance-mode status. The tool is stable, has no dependencies, and works reliably for its core purpose. Install it if your team uses Google, Sphinx, or Numpy docstring styles and wants automated checks for documentation accuracy. Do not expect new features or rapid bug fixes; evaluate whether the current feature set meets your needs before adopting.
Install
darglint on PyPI
pip
pip install darglintuv
uv add darglintpoetry
poetry add darglintInstalling darglint
Before you install
Low install friction with no runtime dependencies. However, the project is in maintenance mode with no active development—the maintainer no longer works with Python regularly and unlikely to add significant new features, though pull requests are accepted.
License in practice
MIT license is permissive, allowing use in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install darglint
# Check a single file
darglint myfile.py
# Check all Python files in a directory
find . -name "*.py" | xargs darglint
Requires Python 3.6 or later; configuration file (.darglint, setup.cfg, or tox.ini) with [darglint] section needed for non-default behavior.
Verify before relying
- Whether the tool integrates with modern linting workflows (flake8, pre-commit) beyond what the description excerpt covers.
- Current state of compatibility with Python 3.10+ despite classifier support only through 3.9.
- Whether configuration via .darglint, setup.cfg, or tox.ini still works reliably in current tooling ecosystems.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6,<4.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,761 days since the last release |
| First released | |
| Downloads | 570,518/month — #5,955 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: darglint-1.8.1-py3-none-any.whl
Keywords: documentation, linter, development
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
pydoclintPydoclint is a Python docstring linter that…
permissive · top 5,000 on PyPI
docsigLints Python function and method signatures to…
permissive · top 15,000 on PyPI
sphinxcontrib-napoleonA Sphinx extension that converts Google and…
permissive · top 15,000 on PyPI
numpydocA Sphinx extension that parses and renders…
permissive · top 5,000 on PyPI
flake8-rst-docstringsA flake8 plugin that validates Python…
permissive · top 15,000 on PyPI
docstr-coverageMeasures docstring coverage in Python source…
permissive · top 15,000 on PyPI
doc8doc8 is a style checker for reStructuredText…
permissive · top 5,000 on PyPI
docstring-inheritanceAutomatically inherits docstrings from parent…
permissive · top 15,000 on PyPI
flake8-docstringsIntegrates pydocstyle docstring checking into…
permissive · top 5,000 on PyPI
sphinx-lintSphinx Lint checks reStructuredText and Python…
permissive · top 15,000 on PyPI