introduce # fmt: off
and # fmt: on
tags to skip formatting within files
#86
Labels
enhancement
New feature or request
This is a follow-up feature request to issue #85 that deals with comment formatting. Handling of one of the test cases there, with aligned comments across multiple lines to hide these lines during docs rendering, cannot be implemented easily within snakefmt.
As suggested in that issue's discussion, one workaround could be comment tags before and after respective sections that turn formatting off and then back on.
black
has this and uses# fmt: off
and#fmt: on
, requiring both comments to be on the same indentation level. I think it would make sense to use exactly the same syntax, so that black users will already know it. And the naming makes perfect sense forsnakefmt
, as well.In black, you should find the relevant code by searching for
FMT_OFF
in:https://github.com/psf/black/blob/dea81b7ad5cfa04c3572771c34af823449d0a8f3/src/black/__init__.py
The text was updated successfully, but these errors were encountered: