Skip to content

Docs Rules

The docs rules read against the PEP 257 docstring set discovered by the Docstring walker and reshape the body, the quote placement, or both. Description prose between the opening """ and the first section heading reads against docstring-line-length (default 76), while every Title-case-headed section that follows reads against code-line-length (default 88) or both collapse to one budget when docstring-structured-policy = "docstring-line-length".

docstring-expand

Docs

Expands a one-line docstring into the multi-line block shape.

docstring-frame

Docs

Canonicalizes a docstring's quotes and frames the opener and closer.

docstring-wrap

Docs

Wraps multi-line docstring bodies at the configured measure.

For the docstring-budget duality and the docstring-structured-policy facet, see the Configuration reference. For the walker that finds every docstring in source order, see the Docstring primitive page.