skillfed

flake8-docstrings

Extension for flake8 which uses pydocstyle to check docstrings

flake8-docstrings v1.7.0 2.1M downloads/30d#3,337 on PyPI159
Permissive license MIT Active released

What it is and what it does

flake8-docstrings is a flake8 plugin that brings pydocstyle's docstring validation into the flake8 linting ecosystem. Instead of running pydocstyle separately, you configure it once in your flake8 setup and check docstrings alongside your other code quality rules. It supports multiple docstring conventions—PEP 257 (the default), numpy, and google—and lets you pick which error codes to enforce using flake8's standard --ignore and --select flags.

The package is lightweight and straightforward to integrate: install it, add a configuration line to your flake8 config (or pass --docstring-convention at the command line), and run flake8 as usual. It's useful for teams that want unified linting configuration and developers who prefer a single tool for all style checks rather than managing separate linters.

Use it for:

  • Enforce numpy-style docstrings in scientific Python projects as part of CI/CD linting.
  • Add docstring validation to an existing flake8 setup without changing your workflow.
  • Enforce google-style docstrings in projects that prefer that convention over PEP 257.
  • Selectively check specific docstring error codes using flake8's --select flag.
  • Maintain consistent docstring standards across a team by centralizing the rule in flake8 config.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates pydocstyle docstring checking into flake8, allowing you to enforce docstring conventions (PEP 257, numpy, google, or custom) as part of your flake8 linting workflow.

Yes. This is a stable, actively maintained plugin with low install friction and no known vulnerabilities. Install it if you use flake8 and want to enforce docstring conventions without adding a separate linting tool to your workflow. The only caveat is that it hasn't been updated since January 2023, so verify compatibility with your current flake8 and pydocstyle versions before relying on it in new projects.

Install

flake8-docstrings on PyPI

pip

pip install flake8-docstrings

uv

uv add flake8-docstrings

poetry

poetry add flake8-docstrings

Installing flake8-docstrings

Before you install

Low friction: pure Python wheel, only two runtime dependencies (flake8 and pydocstyle). Actively maintained as of July 2026, with a stable release history since 2013.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install flake8-docstrings
flake8 --docstring-convention numpy your_file.py

Requires flake8 and pydocstyle to be installed; the available docstring conventions depend on your pydocstyle version.

Verify before relying

  • Whether the package works with the latest versions of flake8 and pydocstyle released after January 2023.
  • Performance impact when checking large codebases or projects with many files.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — flake8, pydocstyle
Maintenance actively maintained — 1,297 days since the last release
Last repo commit
First released
Downloads 2,053,070/month — #3,337 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: flake8_docstrings-1.7.0-py2.py3-none-any.whl

Keywords: PEP 257, pydocstyle, pep257, docstrings, flake8

Environment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPython

Tags

flake8 docstring checkerpydocstyle integration flake8PEP 257 docstring lintingdocstring convention enforcementnumpy google docstring styleflake8 extension docstrings
lintingdocstring-validationflake8-plugin

More Quality Assurance packages