Skip to content

Formatter: hug_parens_with_braces_and_square_brackets preview style #8279

@konstin

Description

@konstin

Port the hug_parens_with_braces_and_square_brackets preview style added to black in PR1 and [PR1](second PR) to ruff formatter:

For better readability and less verticality, Black now pairs parantheses ("(", ")")
with braces ("{", "}") and square brackets ("[", "]") on the same line for single
parameter function calls. For example:

foo(
    [
        1,
        2,
        3,
    ]
)

will be changed to:

foo([
    1,
    2,
    3,
])

Metadata

Metadata

Assignees

Labels

formatterRelated to the formatterpreviewRelated to preview mode features

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions