Skip to content

fmt:on/off placed asymmetrically ends up with a cryptic exception #329

@virtuald

Description

@virtuald

Operating system: Fedora Linux 28
Python version: 3.6
Black version: 18.6b2
Does also happen on master: Yes

something = {
    # fmt: off
    'element': 1,
}
# fmt: on

something_else = 1

Results in the following output

$ black black_error.py 
error: cannot format black_error.py: 10
All done! 💥 💔 💥
1 file failed to reformat.

Expected something telling me which line the error occurred on.

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