-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
collapsible-else-if (PLR5501) --fix removes comments #13545
Labels
fixes
Related to suggested fixes for violations
Comments
cc @diceroll123 as it seems that you are the original author |
Related to #9790 |
@sylvestre where would you expect the comment to be placed after the fix? |
Good point. |
We have test coverage for this behavior already at Lines 73 to 84 in 0f674d1
|
This was referenced Sep 30, 2024
zanieb
added a commit
that referenced
this issue
Oct 3, 2024
Closes #13545 As described in the issue, we move comments before the inner `if` statement to before the newly constructed `elif` statement (previously `else`).
Thanks! |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Trying to reformat firefox code with ruff https://phabricator.services.mozilla.com/D223851#inline-1243679
we noticed a bug with collapsible-else-if - https://docs.astral.sh/ruff/rules/collapsible-else-if/#collapsible-else-if-plr5501
take this case:
Then, with ruff main (ec72e67)
will update the code to:
which removed my comment
The text was updated successfully, but these errors were encountered: