Describe the bug
To Reproduce
For example, take this code:
dependencies = {
a: b,
# fmt: off
}
And run it with these arguments:
The resulting error is:
error: cannot format /Users/yileiyang/Downloads/t.py: Unable to match a closing bracket to the following opening bracket:
Oh no! 💥 💔 💥
1 file would fail to reformat.
Expected behavior
This is not a valid use of # fmt: off, but Black shouldn't crash either.
Environment
- Black's version: this crash existed since v22.1.0 in the stable style
Additional context