Skip to content

Is there a rule that always forces single line dictionaries? #13447

Answered by MichaReiser
Kludex asked this question in Q&A
Discussion options

You must be logged in to vote

No, I don't think such rule exists. You can get this result when using ruff format (be warned, it applies many other formatting rules as well) when setting skip-magic-trailing-comma=true. But only if you're okay if it splits the dictionary over multiple lines if it exceeds the configured line length

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Kludex
Comment options

Answer selected by Kludex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants