-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6a7a0e
commit a8dd376
Showing
12 changed files
with
62 additions
and
270 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
crates/ruff/resources/test/fixtures/ruff/ruff_noqa_invalid.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import os # ruff: noqa: F401 | ||
|
||
|
||
def f(): | ||
x = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
249 changes: 0 additions & 249 deletions
249
crates/ruff/src/rules/ruff/snapshots/ruff__rules__ruff__tests__RUF014_RUF014.py.snap
This file was deleted.
Oops, something went wrong.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...les__ruff__tests__ruff_targeted_noqa.snap → ..._rules__ruff__tests__ruff_noqa_codes.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
crates/ruff/src/rules/ruff/snapshots/ruff__rules__ruff__tests__ruff_noqa_invalid.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
source: crates/ruff/src/rules/ruff/mod.rs | ||
--- | ||
ruff_noqa_invalid.py:1:8: F401 [*] `os` imported but unused | ||
| | ||
1 | import os # ruff: noqa: F401 | ||
| ^^ F401 | ||
| | ||
= help: Remove unused import: `os` | ||
|
||
ℹ Fix | ||
1 |-import os # ruff: noqa: F401 | ||
2 1 | | ||
3 2 | | ||
4 3 | def f(): | ||
|
||
ruff_noqa_invalid.py:5:5: F841 [*] Local variable `x` is assigned to but never used | ||
| | ||
4 | def f(): | ||
5 | x = 1 | ||
| ^ F841 | ||
| | ||
= help: Remove assignment to unused variable `x` | ||
|
||
ℹ Suggested fix | ||
2 2 | | ||
3 3 | | ||
4 4 | def f(): | ||
5 |- x = 1 | ||
5 |+ pass | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.