-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Showing
16 changed files
with
173 additions
and
58 deletions.
There are no files selected for viewing
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
crates/ruff_linter/resources/test/fixtures/ruff/RUF101_1.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,13 @@ | ||
"""Regression test for #14531. | ||
RUF101 should trigger here because the TCH rules have been recoded to TC. | ||
""" | ||
# ruff: noqa: TCH002 | ||
|
||
from __future__ import annotations | ||
|
||
import local_module | ||
|
||
|
||
def func(sized: local_module.Container) -> int: | ||
return len(sized) |
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
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
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
24 changes: 24 additions & 0 deletions
24
..._linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__RUF101_RUF101_1.py.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,24 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/ruff/mod.rs | ||
snapshot_kind: text | ||
--- | ||
RUF101_1.py:5:15: RUF101 [*] `TCH002` is a redirect to `TC002` | ||
| | ||
3 | RUF101 should trigger here because the TCH rules have been recoded to TC. | ||
4 | """ | ||
5 | # ruff: noqa: TCH002 | ||
| ^^^^^^ RUF101 | ||
6 | | ||
7 | from __future__ import annotations | ||
| | ||
= help: Replace with `TC002` | ||
|
||
ℹ Safe fix | ||
2 2 | | ||
3 3 | RUF101 should trigger here because the TCH rules have been recoded to TC. | ||
4 4 | """ | ||
5 |-# ruff: noqa: TCH002 | ||
5 |+# ruff: noqa: TC002 | ||
6 6 | | ||
7 7 | from __future__ import annotations | ||
8 8 | |
2 changes: 1 addition & 1 deletion
2
crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_exemption_all.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
2 changes: 1 addition & 1 deletion
2
...linter/src/snapshots/ruff_linter__noqa__tests__flake8_exemption_all_case_insensitive.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
2 changes: 1 addition & 1 deletion
2
...es/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_exemption_all_no_space.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
Oops, something went wrong.