-
Notifications
You must be signed in to change notification settings - Fork 884
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
b36e441
commit 62b8ddb
Showing
12 changed files
with
388 additions
and
68 deletions.
There are no files selected for viewing
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
44 changes: 44 additions & 0 deletions
44
...napshots/ruff__rules__pyflakes__tests__load_after_multiple_unbinds_from_module_scope.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,44 @@ | ||
--- | ||
source: crates/ruff/src/rules/pyflakes/mod.rs | ||
--- | ||
<filename>:7:26: F841 [*] Local variable `x` is assigned to but never used | ||
| | ||
5 | try: | ||
6 | pass | ||
7 | except ValueError as x: | ||
| ^ F841 | ||
8 | pass | ||
| | ||
= help: Remove assignment to unused variable `x` | ||
|
||
ℹ Fix | ||
4 4 | def f(): | ||
5 5 | try: | ||
6 6 | pass | ||
7 |- except ValueError as x: | ||
7 |+ except ValueError: | ||
8 8 | pass | ||
9 9 | | ||
10 10 | try: | ||
|
||
<filename>:12:26: F841 [*] Local variable `x` is assigned to but never used | ||
| | ||
10 | try: | ||
11 | pass | ||
12 | except ValueError as x: | ||
| ^ F841 | ||
13 | pass | ||
| | ||
= help: Remove assignment to unused variable `x` | ||
|
||
ℹ Fix | ||
9 9 | | ||
10 10 | try: | ||
11 11 | pass | ||
12 |- except ValueError as x: | ||
12 |+ except ValueError: | ||
13 13 | pass | ||
14 14 | | ||
15 15 | # This should resolve to the `x` in `x = 1`. | ||
|
||
|
32 changes: 32 additions & 0 deletions
32
.../pyflakes/snapshots/ruff__rules__pyflakes__tests__load_after_unbind_from_class_scope.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/pyflakes/mod.rs | ||
--- | ||
<filename>:8:30: F841 [*] Local variable `x` is assigned to but never used | ||
| | ||
6 | try: | ||
7 | pass | ||
8 | except ValueError as x: | ||
| ^ F841 | ||
9 | pass | ||
| | ||
= help: Remove assignment to unused variable `x` | ||
|
||
ℹ Fix | ||
5 5 | def f(): | ||
6 6 | try: | ||
7 7 | pass | ||
8 |- except ValueError as x: | ||
8 |+ except ValueError: | ||
9 9 | pass | ||
10 10 | | ||
11 11 | # This should raise an F821 error, rather than resolving to the | ||
|
||
<filename>:13:15: F821 Undefined name `x` | ||
| | ||
11 | # This should raise an F821 error, rather than resolving to the | ||
12 | # `x` in `x = 1`. | ||
13 | print(x) | ||
| ^ F821 | ||
| | ||
|
||
|
24 changes: 24 additions & 0 deletions
24
...pyflakes/snapshots/ruff__rules__pyflakes__tests__load_after_unbind_from_module_scope.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/src/rules/pyflakes/mod.rs | ||
--- | ||
<filename>:7:26: F841 [*] Local variable `x` is assigned to but never used | ||
| | ||
5 | try: | ||
6 | pass | ||
7 | except ValueError as x: | ||
| ^ F841 | ||
8 | pass | ||
| | ||
= help: Remove assignment to unused variable `x` | ||
|
||
ℹ Fix | ||
4 4 | def f(): | ||
5 5 | try: | ||
6 6 | pass | ||
7 |- except ValueError as x: | ||
7 |+ except ValueError: | ||
8 8 | pass | ||
9 9 | | ||
10 10 | # This should resolve to the `x` in `x = 1`. | ||
|
||
|
44 changes: 44 additions & 0 deletions
44
...s/snapshots/ruff__rules__pyflakes__tests__load_after_unbind_from_nested_module_scope.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,44 @@ | ||
--- | ||
source: crates/ruff/src/rules/pyflakes/mod.rs | ||
--- | ||
<filename>:7:26: F841 [*] Local variable `x` is assigned to but never used | ||
| | ||
5 | try: | ||
6 | pass | ||
7 | except ValueError as x: | ||
| ^ F841 | ||
8 | pass | ||
| | ||
= help: Remove assignment to unused variable `x` | ||
|
||
ℹ Fix | ||
4 4 | def f(): | ||
5 5 | try: | ||
6 6 | pass | ||
7 |- except ValueError as x: | ||
7 |+ except ValueError: | ||
8 8 | pass | ||
9 9 | | ||
10 10 | def g(): | ||
|
||
<filename>:13:30: F841 [*] Local variable `x` is assigned to but never used | ||
| | ||
11 | try: | ||
12 | pass | ||
13 | except ValueError as x: | ||
| ^ F841 | ||
14 | pass | ||
| | ||
= help: Remove assignment to unused variable `x` | ||
|
||
ℹ Fix | ||
10 10 | def g(): | ||
11 11 | try: | ||
12 12 | pass | ||
13 |- except ValueError as x: | ||
13 |+ except ValueError: | ||
14 14 | pass | ||
15 15 | | ||
16 16 | # This should resolve to the `x` in `x = 1`. | ||
|
||
|
24 changes: 0 additions & 24 deletions
24
.../rules/pyflakes/snapshots/ruff__rules__pyflakes__tests__print_after_shadowing_except.snap
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.