-
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
fix: Don't normalize whitespace before fmt:skip comments #4146
Conversation
Signed-off-by: RedGuy12 <[email protected]> Signed-off-by: RedGuy12 <[email protected]>
Signed-off-by: RedGuy12 <[email protected]>
Thanks. This will have to go into the preview style as it changes existing formatting, and it'll probably have to wait until the 2024 stable style is out. I don't understand the statement that you're not addressing https://github.com/psf/black/pull/2970#pullrequestreview-932691073—what else is there in that comment that this PR is not fixing? |
Signed-off-by: RedGuy12 <[email protected]>
#4143 talks about normalizing whitespace before the
Done! |
Signed-off-by: RedGuy12 <[email protected]>
Signed-off-by: RedGuy12 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you!
(technically this change does meet the stability policy, since it won't cause changes in already blackened code, but always nice to let things bake in preview...)
Description
Resolves #4143. I attempted to fix #2970 (review) while I was at it. However, that's a larger undertaking since
_contains_fmt_skip_comment()
requires amode
parameter andmake_comment()
doesn't - I'd have to add it to every caller ofmake_comment()
and each of its callers, etc. Let me know if it's desired anyway.Checklist - did you ...
CHANGES.md
if necessary?