Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline array option for dumps #385

Open
dbohdan opened this issue Nov 11, 2024 · 0 comments
Open

Multiline array option for dumps #385

dbohdan opened this issue Nov 11, 2024 · 0 comments

Comments

@dbohdan
Copy link

dbohdan commented Nov 11, 2024

It would be useful for my project Remarshal and likely for other downstream users of TOML Kit to be able to tell toml.dumps to output multiline arrays. For example, you could call toml.dumps(foo, multiline=True) for only multiline arrays, call toml.dumps(foo, multiline=5) and make arrays with five or more items multiline, or have it based on the line length. Without this feature, you either get output like my TOML example or have to construct the document manually.

The option could also apply to inline tables if a future TOML spec added them.

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

No branches or pull requests

1 participant