Ruff formatting: do not add linebreak between function call parentheses and dictionary literal #18703
Answered
by
MichaReiser
vitalii-diachkov-sumup
asked this question in
Q&A
-
Is there any way to configure some_function({
"foo": "bar",
"baz": "qux",
}) instead of some_function(
{
"foo": "bar",
"baz": "qux",
}
) i.e. for functions or expressions that takes dict as the only argument do not add linebreak between parentheses and brackets |
Beta Was this translation helpful? Give feedback.
Answered by
MichaReiser
Jun 16, 2025
Replies: 1 comment 4 replies
-
There's no such option today but this is implemented as a preview style. You can enable it with |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
vitalii-diachkov-sumup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's no such option today but this is implemented as a preview style. You can enable it with
format.preview = true
. But this may enable other preview styles as well (I don't think there are any at the moment but we may change the preview style in any release).https://play.ruff.rs/bdfee16c-e957-44e2-8256-c59c52e98510