Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[
ruff
] Unformatted special comments (RUF037
) #14111[
ruff
] Unformatted special comments (RUF037
) #14111Changes from 22 commits
ac6ab76
58c46ff
d7db816
dc2e866
7c97af8
43b24cd
0d0cc2b
189f265
7cfe1b4
fd51044
e332e23
48bba9d
2c3efb7
66f77d2
60e9da3
1d9c9df
0e11a3e
a050fc7
42f9577
268edc3
e33b05c
9c5ec19
1c1b732
ee6dc39
78327f0
99606d8
c899ead
7cdf2d3
7bc3a84
2fbd4a2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you explain the reasoning for this special handling? I think I would find this behavior surprising and I'm not sure if it justifies the added complexity
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.
blanket-noqa
(PGH004
) gets similar treatment (right above, line 48), and must either not be enabled or explicitly disabled usingper-file-ignores
/# ruff: noqa: PGH004
(line 223):RUF104
isn't anoqa
-only rule, sounformatted_special_comment()
shouldn't be called fromcheck_noqa()
. However,exemption
is computed withincheck_noqa()
using a function that might emit a warning if a# noqa:
comment does not have any codes. This means the necessary information cannot be retrieved from functions other thancheck_noqa()
without undesirable side-effects.