Dictionary opening/closing brace on a separate lines? #13013
darktempla
started this conversation in
General
Replies: 1 comment 2 replies
-
Hi @darktempla The formatting you're observing is the current stable style. Ruff supports a new formatting style in preview-mode that ensures that dictionary and other parenthesized expressions in single-argument call expressions keep the parentheses on the same line. See #8279 You can opt-in to preview styles by setting |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Any guidance on this would be appreciated.
When running
ruff format --diff
why is the dictionary opening/closing braces being put on a new line?Apart from a
# fmt: off
block is there some way via the configuration to disable this formatting?It doesn't format the dictionary if it is assigned to a variable only when an inline function parameter.
Configuration (pyproject.toml)
Beta Was this translation helpful? Give feedback.
All reactions