Exceptions to comment spacing #3668
Labels
F: comments
The syntactic kind. Not in the language grammar, always on our minds. Best bugs.
S: needs discussion
Needs further hashing out before ready for implementation (on desirability, feasibility, etc.)
T: enhancement
New feature or request
Black enforces that every comment starts with a space, except if the comment starts with a hardcoded list of
black.comments.COMMENT_EXCEPTIONS
(COMMENT_EXCEPTIONS = " !:#'"
). These were added over time to support particular tools that treat certain comments specially. We occasionally get requests to treat more comments specially (#3557) or confusion because of the inclusion of particular characters (#3036). I am opening this issue to focus the discussion and arrive at an overall solution.Options I'm considering:
COMMENT_EXCEPTIONS
. We're generally hesitant to do this because it makes the Black code style less consistent, but I think in this case there's a reasonably strong argument: different projects use different tools, so it makes sense to have a different configuration for this option.The text was updated successfully, but these errors were encountered: