Skip to content

Formatter generates invalid code with StmtAssign, parentheses and comments #7892

@konstin

Description

@konstin

Input:

x = (
    # a
    ( # b
        1
    )
)

Output:

x = # a
(  # b
    1
)

Playground link: https://play.ruff.rs/70f3526e-34ac-46e3-a0cf-098a60537a91

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingformatterRelated to the formatter

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions