-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
# fmt: pass - ignore formatting for single statements #1162
Comments
I like this one.. but would like to extend it a bit more
if i place at the end of the statement - it should work as well (not only before the statement) |
I would love to see this feature merged! |
Expanding on @vitalik's ask. It would be great if this feature would be compatible with other inline comment options.
|
The reason why I uninstalled black :( |
We definitly need something like this. I have ansible vars in my python script turning the line into # fmt: off
my_var = {{ variable_name }}
# fmt: on looks very ugly in my opinion. |
Feature request:
# fmt: pass
would skip formatting for the single statement that immediately follows.Is your feature request related to a problem? Please describe.
Not a response to a problem but it might be helpful for the following reasons:
Describe the solution you'd like
The
custom_formatting
list would be ignored, everything else would be formatted.Describe alternatives you've considered
#fmt: off
at end of line (Should# fmt: off
be allowed as an inline comment? #790)I believe
# fmt: pass
addresses the same concern while also being a bit more flexible.# fmt: pass
is more readable & predictable as a separate lineAdditional context
Naming:
# fmt: pass
reflects Python's existing pass statement. Hopefully this hints that you can use it to temporarily appease the formatter for one quick thing, but it's not something you want everywhere.Naming could be anything, e.g. "pass", "skip", "ignore"
The text was updated successfully, but these errors were encountered: