Skip to content

Support TOML formatting with a non-empty context#52

Merged
mthuurne merged 1 commit intomainfrom
format-toml-context
Nov 25, 2025
Merged

Support TOML formatting with a non-empty context#52
mthuurne merged 1 commit intomainfrom
format-toml-context

Conversation

@mthuurne
Copy link
Copy Markdown
Member

@mthuurne mthuurne commented Nov 25, 2025

Since we support binding tables that are not at the root of a TOML file, it makes sense to also support formatting non-root tables. This is done by passing a context argument that is prefixed to all table names in the TOML output.

Both Binder.format_toml() and Binder.format_toml_template() now take a context argument, which defaults to the empty string, preserving the previous behavior.

Since we support binding tables that are not at the root of a TOML
file, it makes sense to also support formatting non-root tables.
This is done by passing a `context` argument that is prefixed to
all table names in the TOML output.
@mthuurne mthuurne merged commit 86a8351 into main Nov 25, 2025
12 checks passed
@mthuurne mthuurne deleted the format-toml-context branch November 25, 2025 00:03
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