-
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
Showing
2 changed files
with
48 additions
and
8 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
36 changes: 33 additions & 3 deletions
36
...uff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI010_PYI010.pyi.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 |
---|---|---|
@@ -1,29 +1,59 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_pyi/mod.rs | ||
--- | ||
PYI010.pyi:6:5: PYI010 Function body must contain only `...` | ||
PYI010.pyi:6:5: PYI010 [*] Function body must contain only `...` | ||
| | ||
6 | def buzz(): | ||
7 | print("buzz") # ERROR PYI010 | ||
| ^^^^^^^^^^^^^ PYI010 | ||
8 | | ||
9 | def foo2(): | ||
| | ||
= help: Replace function body with `...` | ||
|
||
PYI010.pyi:9:5: PYI010 Function body must contain only `...` | ||
ℹ Fix | ||
3 3 | """foo""" # OK, strings are handled by another rule | ||
4 4 | | ||
5 5 | def buzz(): | ||
6 |- print("buzz") # ERROR PYI010 | ||
6 |+ ... # ERROR PYI010 | ||
7 7 | | ||
8 8 | def foo2(): | ||
9 9 | 123 # ERROR PYI010 | ||
|
||
PYI010.pyi:9:5: PYI010 [*] Function body must contain only `...` | ||
| | ||
9 | def foo2(): | ||
10 | 123 # ERROR PYI010 | ||
| ^^^ PYI010 | ||
11 | | ||
12 | def bizz(): | ||
| | ||
= help: Replace function body with `...` | ||
|
||
ℹ Fix | ||
6 6 | print("buzz") # ERROR PYI010 | ||
7 7 | | ||
8 8 | def foo2(): | ||
9 |- 123 # ERROR PYI010 | ||
9 |+ ... # ERROR PYI010 | ||
10 10 | | ||
11 11 | def bizz(): | ||
12 12 | x = 123 # ERROR PYI010 | ||
|
||
PYI010.pyi:12:5: PYI010 Function body must contain only `...` | ||
PYI010.pyi:12:5: PYI010 [*] Function body must contain only `...` | ||
| | ||
12 | def bizz(): | ||
13 | x = 123 # ERROR PYI010 | ||
| ^^^^^^^ PYI010 | ||
| | ||
= help: Replace function body with `...` | ||
|
||
ℹ Fix | ||
9 9 | 123 # ERROR PYI010 | ||
10 10 | | ||
11 11 | def bizz(): | ||
12 |- x = 123 # ERROR PYI010 | ||
12 |+ ... # ERROR PYI010 | ||
|
||
|