They were not aligned properly, which causes Black to crash:
$ black --version black, version 20.8b1 $ cat test.py def f(): # fmt: off if True: print() # fmt: on def g(): pass $ black test.py error: cannot format test.py: INTERNAL ERROR: Black produced code that is not equivalent to the source. Please report a bug on https://github.com/psf/black/issues. This diff might be helpful: /tmp/blk_phpp_27o.log Oh no! ๐ฅ ๐ ๐ฅ 1 file failed to reformat.