You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am the author of Leo. At present, black inserts a blank between "#" and "@". Alas, this seriously interferes with Leo's 20-year-old format for sentinel comments.
This post discusses all the gory details. The take-away is that Leo has is no good solution to the problem.
Happily, there is a dead easy patch: In make_comment, change:
@JelleZijlstra Thanks for the link. Imo, black should have more options. More people will use black if they can configure it so it works for them, their team, their organization.
@JelleZijlstra I agree that none of the options discussed in #3668 are perfect. Most projects should be able to find a way of living with Black's formatting of comments. For example:
Leo has long been able to read blackened sentinel comments.
Leo's newish --black-sentinels command-line option causes Leo to write black-compatible sentinel comments.
I am the author of Leo. At present, black inserts a blank between "#" and "@". Alas, this seriously interferes with Leo's 20-year-old format for sentinel comments.
This post discusses all the gory details. The take-away is that Leo has is no good solution to the problem.
Happily, there is a dead easy patch: In make_comment, change:
to:
Better, the option could be a regex, specifying the exact exceptions.
I hope you will consider adding such an option. Even a non-regex option would make a big difference.
Edward
P.S. For Leo, the regex would be the union of the following :-)
EKR
The text was updated successfully, but these errors were encountered: