-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Clean Trailing Whitespace #2435
Comments
Can you give a specific example? I'm pretty sure we do clean it. The only exception may be within string literals, where changing whitespace could change the meaning of the code. |
I'm out of the project?
пт, 20 авг. 2021 г., 21:16 John Stilley ***@***.***>:
… *Describe the style change*
Black does not currently clean trailing whitespace. This is strange, and
does not jive well with any major Python linter I can find (say Pylint).
*Additional context*
The only reason I can think of to not do this now is backwards
compatibility.
If ticket isn't immediately closed for being annoying to the dev team, I
would happily implement it.
Thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2435>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARZEIIRJNJCBPV7R6BIMZJDT53V4RANCNFSM5CRHMMQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Ah, so that's your reasoning. Okay, well, I guess we can close this. The problem we have with But you're saying that's a design goal? Well, okay then. Thanks! |
We've had people comment how all whitespace is important in their docstrings because some pattern matching library uses the docstrings as a regex value for example 🙃 [1] #2150 has some good background discussion on this (plus other stuff). |
IMO, I would perfer for docstrings to not be touched-- the ast should be as little affected as possible, if not touched at all. IF docstrings are touched, it should be a configuration option, perhaps even with a |
Describe the style change
Black does not currently clean trailing whitespace. This is strange, and does not jive well with any major Python linter I can find (say Pylint).
Additional context
The only reason I can think of to not do this now is backwards compatibility.
If ticket isn't immediately closed for being annoying to the dev team, I would happily implement it.
Thanks.
The text was updated successfully, but these errors were encountered: