fmt: off/on doesn't disable black formatting for comments unless code is also present.
The following:
# fmt: off
#setup: device 3423
# fmt: on
Yields:
# setup: device 3423
But, add some code:
# fmt: off
#setup: device 3423
black = 'test'
# fmt: on
and the comment is also ignored (as desired).
Also happens on master.
Duplicate of https://github.com/psf/black/issues/1245?
Thanks @hugovk, yes, this is a duplicate of #1245. Thanks @djlondon for filing the bug report, good to know that this issue still exists on current master!