Skip to content

Auto-Fix Rules

Auto-fix rules rewrite source as part of prose format and surface as Severity::Format diagnostics under prose check. Each rule resolves a layout question Prose can answer mechanically (alignment columns, alphabetization order, blank-line counts, collection layout, trailing-comma presence) and emits an Edit list the Pipeline applies between rules. Auto-fix rules never report a violation the binary won't itself resolve.

align-colons

Alignment

Prose aligns the : separator across dict literals, dataclass and Pydantic fields, function-signature annotations, and docstring Args: blocks.

align-comparisons

Alignment

Prose aligns comparison operators vertically across the operands of a multi-line and-chain or or-chain.

align-equals

Alignment

Prose aligns the = separator across consecutive single-target assignments and annotated function-parameter defaults.

align-imports

Alignment

Prose aligns the import and as keywords across consecutive import statements.

align-match-case

Alignment

Prose aligns the post-pattern : across single-expression case bodies inside a match statement.

alphabetize

Ordering

Prose alphabetizes import siblings, dict-key blocks, and dataclass field runs.

blank-lines

Formatting

Prose normalizes blank-line counts to canonical values between thematically adjacent statements.

call-layout

Formatting

Prose explodes a keyword-expressible call carrying more than the inline-argument cap to one keyword argument per line.

collection-layout

Formatting

Prose splits list, tuple, dict, and set literals into one-entry-per-line layout once they overflow their width, or a dict crosses an entry-count cap.

docstring-expand

Docs

Prose expands a one-line docstring into the multi-line block shape.

docstring-frame

Docs

Prose drops a multi-line docstring's opener and closer onto their own lines.

docstring-wrap

Docs

Prose wraps multi-line docstring bodies at the configured measure.

import-layout

Formatting

Prose splits an over-budget from ... import ... into a run of repeated-prefix statements packed to the import budget.

signature-layout

Formatting

Prose normalizes function signatures to one line or one parameter per line, gated by line length and inline-parameter count.

strip-align-padding

Formatting

Prose strips padding from alignment groups that resolve to a single member.

strip-trailing-commas

Formatting

Prose removes trailing commas from inside single-line collections.

unused-future-annotations

Formatting

Prose removes from __future__ import annotations lines that no longer carry their weight on the target Python version.

For the deterministic order these rules fire in, see the Pipeline Order reference. For the per-rule knobs, see the Configuration reference. For the lint rules that surface diagnostics without rewriting, see the Lint landing.