Skip to content

Match pretty-format-toml inline table style in the template - #251

Open
jefftriplett wants to merge 2 commits into
mainfrom
fix/toml-inline-table-spacing
Open

jefftriplett wants to merge 2 commits into
mainfrom
fix/toml-inline-table-spacing

Conversation

@jefftriplett

@jefftriplett jefftriplett commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

The copier template still emitted the old pretty-format-toml inline-table style, so the hook reformatted every generated example and failed examples / generate. Emitting the padded style leaves nothing to reformat.

pretty-format-toml changed its inline table style to pad braces with
spaces. The committed files were autofixed by pre-commit.ci, but the
copier template still emitted the old style, so every generated example
was reformatted the moment `just generate-examples` linted it.

A hook that modifies a file exits non-zero, which failed `just lint`,
which failed copier's task, which failed generate-example — for all
three examples:

    Pretty format TOML.....................................Failed
    - hook id: pretty-format-toml
    - files were modified by this hook
    File examples/calver_inc/pyproject.toml is not pretty-formatted

Emitting the padded style means there is nothing left to reformat.

Only the two real inline tables are changed. The bumpver format strings
below them ({version}, {old_version}) are not TOML tables and are left
alone.
@jefftriplett
jefftriplett requested a review from a team as a code owner September 15, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant