-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement W291 (trailing whitespace)? #1734
Comments
I don't know if it's relevant (haven't thought through how we would implement trailing whitespace), but I started implementing Pycodestyle's logical line detection in #1130 -- although I felt at the time that it was a bit too slow to be worthwhile as a default. |
Do these checks typically exclude trailing whitespace within strings? |
Black preserves trailing whitespace in multiline strings (as it should). I just checked and pycodestyle does trigger W291 for trailing whitespace within multiline strings. To be honest I don't really see the point of this lint. |
I think it's a perfectly useful rule, if you don't use an autoformatter. |
Haha yes I don't see why you wouldn't.^^ |
@charliermarsh @not-my-profile Agreed! Let me close this. |
Yes, black does. We can align with black and ignore trailing whitespace in strings (as shown in the attached screenshot). |
It'd be nice if Ruff could detect trailing whitespace:
(even though black can eliminate them)
The text was updated successfully, but these errors were encountered: