Skip to content

newline after opening braces causes parser error #4305

@li6in9muyou

Description

@li6in9muyou

duplicate of #3746

$ black p.py
error: cannot format p.py: Cannot parse: 1:7: print(f"Frame({

Oh no! 💥 💔 💥
1 file failed to reformat.

$ python .\p.py
Frame(1 2, 3, 4, 5)

$ black --version
black, 24.3.0 (compiled: yes)
Python (CPython) 3.12.2

$ cat .\p.py
print(f"Frame({
    1} {
    2}, {3}, {
    4}, {5})")

Metadata

Metadata

Assignees

No one assigned

    Labels

    T: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions