Skip to content

missing-public-package-documentation (PDF600)

Added in 1.0.0 Never fix By default

Part of the PDF rule category.

View source · View documentation source · Search issues

Fix is not available.

What it does

Checks for public package initializer files that are missing a module docstring.

Package checks apply only to __init__ Python source or stub files. A package path is public when no discovered package path component starts with an underscore.

Why is this useful?

Public packages should describe their purpose and exported surface at the package boundary.

Ruff compatibility

This rule replaces Ruff's D104.

Examples

A public package initializer without a module docstring is reported:

DEFAULT_TIMEOUT = 30
PDF600: Line 1: Public package is missing docstring

A documented public package is accepted:

"""Client package."""

DEFAULT_TIMEOUT = 30

Non-package modules are ignored by the package rule:

DEFAULT_TIMEOUT = 30

Private package paths are handled by PDF601 instead:

DEFAULT_TIMEOUT = 30

Options

None.