blank-lines
FormattingProse normalizes
The formatting rules shape the surrounding scaffolding around statements (blank-line counts between definitions, collection layout against a line budget, trailing-comma discipline, singleton-group strip). Each rule resolves a layout question that sits adjacent to alignment and ordering, with the rewrites typically narrower than the alignment rules and more pervasive than the ordering rules. The
rule reads against thecode-line-length budget, with its max-atomics-per-line knob carrying the per-line cap for atomic-literal collections.Prose normalizes
Prose explodes a keyword-expressible call carrying more than the inline-argument cap to one keyword argument per line.
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.
Prose splits an over-budget from ... import ... into a run of repeated-prefix statements packed to the import budget.
Prose normalizes function signatures to one line or one parameter per line, gated by line length and inline-parameter count.
Prose strips padding from
Prose removes trailing commas from inside single-line collections.
Prose removes from __future__ import annotations lines that no longer carry their weight on the target Python version.
For the per-rule knobs, see the Configuration reference. For the pipeline order these rules fire in (formatting rules run early so the layout surface is settled by the time alignment rules measure widths), see the Pipeline Order reference.