Pydocstyle

6.3.0 · deprecated · verified Thu Apr 09

Pydocstyle is a static analysis tool designed to check Python code for compliance with docstring conventions, primarily PEP 257. It supports various docstring formats, including Google and NumPy styles. The project is currently at version 6.3.0, but it is officially deprecated and no longer actively maintained, with the recommendation to migrate to Ruff for docstring linting.

Warnings

Install

Imports

Quickstart

Pydocstyle is typically used as a command-line tool. Create a Python file (e.g., `example.py`) with docstrings, then run pydocstyle against it. The `--ignore` or `--select` options allow for fine-grained control over which docstring style errors are reported.

import os

def my_function():
    """This is a sample function.

    It returns a string.
    """
    return "Hello"

# Save this to a file, e.g., `example.py`
# Then run from the command line:
# pydocstyle example.py
# You can also customize checks:
# pydocstyle --ignore=D100,D104 example.py

view raw JSON →