Skip to content

Layout Rules

The layout rules decide the shape a bracketed construct takes once it outgrows a single line, exploding a call, signature, collection, or from … import … to one entry per line so each binding reads on its own and a later edit touches a single row. The trigger is a width budget like code-line-length, a count cap like max-inline-args, or both, so the inline shape gives way to the stacked one the moment it stops being legible.

call-layout

Layout

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

collection-layout

Layout

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.

import-layout

Layout

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

signature-layout

Layout

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

For the per-rule facets, see the Configuration reference. For the order these rules fire in (layout settles the bracketed shape early, so the alignment rules measure their columns against the committed layout), see the Pipeline Order reference.