Commit f5b61be
authored
Remove invalid inline
Summary
--
This PR partially addresses #23267. This warning is now implemented as
the
RUF102 lint rule, so we can get rid of the warning.
There's actually a second instance of this warning (the only variant
with tests)
for file-level `noqa`s. As I noted on the issue, these aren't actually
covered
by RUF102, but I think we should make that change and remove that
warning
separately.
Test Plan
--
Manual testing:
```console
❯ ruff check --select RUF102 --output-format=concise --no-cache - <<EOF
1 # noqa: X111
EOF
warning: Invalid rule code provided to `# noqa` at -:1: X111
-:1:3: RUF102 [*] Invalid rule code in `# noqa`: X111
Found 1 error.
[*] 1 fixable with the `--fix` option.
❯ cargo run -p ruff -- check --select RUF102 --output-format=concise --no-cache - <<EOF
1 # noqa: X111
EOF
-:1:3: RUF102 [*] Invalid rule code in `# noqa`: X111
Found 1 error.
[*] 1 fixable with the `--fix` option.
```noqa warning (#23270)1 parent 496559e commit f5b61be
2 files changed
Lines changed: 3 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
| 774 | + | |
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| |||
1082 | 1082 | | |
1083 | 1083 | | |
1084 | 1084 | | |
1085 | | - | |
1086 | 1085 | | |
1087 | 1086 | | |
1088 | 1087 | | |
| |||
1106 | 1105 | | |
1107 | 1106 | | |
1108 | 1107 | | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
1126 | | - | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
1132 | 1108 | | |
1133 | 1109 | | |
1134 | 1110 | | |
| |||
0 commit comments