hug_parens_with_braces_and_square_brackets
: Recursively hugging parens decrease readability
#4098
Labels
C: preview style
Issues with the preview and unstable style. Add the name of the responsible feature in the title.
T: style
What do we want Blackened code to look like?
This is feedback related to the
hug_parens_with_braces_and_square_brackets
preview style.Describe the style change
Only collapse the first set of parens rather than all parens recursively. Having too many opening/closing parens on a single line makes it harder to distinguish the individual parentheses (especially if they are all of the same kind).
Examples in the current Black style
Here an example from Ruff's shade after implementing the
hug_parens_with_braces_and_square_brackets
preview style recursively.Desired style
Additional context
This issue is split out from my stable style 2024 comment.
Ruff implements
hug_parens_with_braces_and_square_brackets
in preview style but we intentionally haven't implemented recursive hugging yet.The text was updated successfully, but these errors were encountered: