We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdb89eb commit 7ab4d6cCopy full SHA for 7ab4d6c
1 file changed
crates/ruff_linter/src/checkers/noqa.rs
@@ -147,9 +147,7 @@ pub(crate) fn check_noqa(
147
break;
148
}
149
150
- if !seen_codes.insert(original_code) {
151
- duplicated_codes.push(original_code);
152
- } else {
+ if seen_codes.insert(original_code) {
153
let is_code_used = if is_file_level {
154
diagnostics
155
.iter()
@@ -172,6 +170,8 @@ pub(crate) fn check_noqa(
172
170
} else {
173
171
unknown_codes.push(original_code);
174
+ } else {
+ duplicated_codes.push(original_code);
175
176
177
0 commit comments