# fmt: off
fails to stop formatting on a comment block
#2329
Labels
F: comments
The syntactic kind. Not in the language grammar, always on our minds. Best bugs.
F: fmtoff
fmt: off implementation
R: duplicate
This issue or pull request already exists
T: bug
Something isn't working
Describe the bug
I have this file header in my source that I'd like to not mess with since it's got license information for code that isn't mine. So I wrap it in
# fmt: off; ...; # fmt: on
to preserve the block, but the block gets formatted anyway (a space gets added after the#
).Before black:
After black:
To Reproduce
Expected behavior
Code doesn't get formatted
Environment (please complete the following information):
__main__.py, version 20.8b1
Ubuntu 18.04.5 LTS
,Python 3.6.9
Does this bug also happen on main?
The text was updated successfully, but these errors were encountered: