Skip to content

Crash in preview style with assert + parenthesized string #3414

@JelleZijlstra

Description

@JelleZijlstra
assert xxxxxxxxx.xxxxxxxxx.xxxxxxxxx(
    xxxxxxxxx
).xxxxxxxxxxxxxxxxxx(), (
    "xxx {xxxxxxxxx} xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
)

Running black --preview on this file results in error: cannot format xxxxxx.py: Unable to match a closing bracket to the following opening bracket: .

This is a regression in 22.12.0. It bisects to #3370, cc @yilei.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions