-
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
1 parent
6172853
commit 306995a
Showing
5 changed files
with
166 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,11 @@ def bar(self): | |
# E204 | ||
@ foo | ||
def baz(self): | ||
print('baz') | ||
print('baz') | ||
|
||
|
||
# E204 | ||
@ \ | ||
foo | ||
def baz(): | ||
print('baz') |
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
63 changes: 63 additions & 0 deletions
63
...src/rules/pycodestyle/snapshots/ruff_linter__rules__pycodestyle__tests__E204_E204.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,63 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs | ||
--- | ||
E204.py:14:1: E204 [*] Whitespace after decorator | ||
| | ||
13 | # E204 | ||
14 | @ foo | ||
| ^^^^^ E204 | ||
15 | def baz(): | ||
16 | print('baz') | ||
| | ||
= help: Remove whitespace | ||
|
||
ℹ Safe fix | ||
11 11 | print('bar') | ||
12 12 | | ||
13 13 | # E204 | ||
14 |-@ foo | ||
14 |+@foo | ||
15 15 | def baz(): | ||
16 16 | print('baz') | ||
17 17 | | ||
|
||
E204.py:25:5: E204 [*] Whitespace after decorator | ||
| | ||
24 | # E204 | ||
25 | @ foo | ||
| ^^^^^ E204 | ||
26 | def baz(self): | ||
27 | print('baz') | ||
| | ||
= help: Remove whitespace | ||
|
||
ℹ Safe fix | ||
22 22 | print('bar') | ||
23 23 | | ||
24 24 | # E204 | ||
25 |- @ foo | ||
25 |+ @foo | ||
26 26 | def baz(self): | ||
27 27 | print('baz') | ||
28 28 | | ||
|
||
E204.py:31:1: E204 [*] Whitespace after decorator | ||
| | ||
30 | # E204 | ||
31 | / @ \ | ||
32 | | foo | ||
| |___^ E204 | ||
33 | def baz(): | ||
34 | print('baz') | ||
| | ||
= help: Remove whitespace | ||
|
||
ℹ Safe fix | ||
28 28 | | ||
29 29 | | ||
30 30 | # E204 | ||
31 |-@ \ | ||
32 |-foo | ||
31 |+@foo | ||
33 32 | def baz(): | ||
34 33 | print('baz') |
65 changes: 65 additions & 0 deletions
65
...rules/pycodestyle/snapshots/ruff_linter__rules__pycodestyle__tests__E204_E204.py.snap.new
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,65 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs | ||
assertion_line: 68 | ||
--- | ||
E204.py:14:2: E204 [*] Whitespace after decorator | ||
| | ||
13 | # E204 | ||
14 | @ foo | ||
| ^ E204 | ||
15 | def baz(): | ||
16 | print('baz') | ||
| | ||
= help: Remove whitespace | ||
|
||
ℹ Safe fix | ||
11 11 | print('bar') | ||
12 12 | | ||
13 13 | # E204 | ||
14 |-@ foo | ||
14 |+@foo | ||
15 15 | def baz(): | ||
16 16 | print('baz') | ||
17 17 | | ||
|
||
E204.py:25:6: E204 [*] Whitespace after decorator | ||
| | ||
24 | # E204 | ||
25 | @ foo | ||
| ^ E204 | ||
26 | def baz(self): | ||
27 | print('baz') | ||
| | ||
= help: Remove whitespace | ||
|
||
ℹ Safe fix | ||
22 22 | print('bar') | ||
23 23 | | ||
24 24 | # E204 | ||
25 |- @ foo | ||
25 |+ @foo | ||
26 26 | def baz(self): | ||
27 27 | print('baz') | ||
28 28 | | ||
|
||
E204.py:31:2: E204 [*] Whitespace after decorator | ||
| | ||
30 | # E204 | ||
31 | @ \ | ||
| __^ | ||
32 | | foo | ||
| |_^ E204 | ||
33 | def baz(): | ||
34 | print('baz') | ||
| | ||
= help: Remove whitespace | ||
|
||
ℹ Safe fix | ||
28 28 | | ||
29 29 | | ||
30 30 | # E204 | ||
31 |-@ \ | ||
32 |-foo | ||
31 |+@foo | ||
33 32 | def baz(): | ||
34 33 | print('baz') |