-
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
938118b
commit f446cd4
Showing
3 changed files
with
264 additions
and
11 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
226 changes: 226 additions & 0 deletions
226
.../rules/pycodestyle/snapshots/ruff_linter__rules__pycodestyle__tests__E231_E23.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,226 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs | ||
assertion_line: 153 | ||
--- | ||
E23.py:2:7: E231 [*] Missing whitespace after ',' | ||
| | ||
1 | #: E231 | ||
2 | a = (1,2) | ||
| ^ E231 | ||
3 | #: E231 | ||
4 | a[b1,:] | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
1 1 | #: E231 | ||
2 |-a = (1,2) | ||
2 |+a = (1, 2) | ||
3 3 | #: E231 | ||
4 4 | a[b1,:] | ||
5 5 | #: E231 | ||
|
||
E23.py:4:5: E231 [*] Missing whitespace after ',' | ||
| | ||
2 | a = (1,2) | ||
3 | #: E231 | ||
4 | a[b1,:] | ||
| ^ E231 | ||
5 | #: E231 | ||
6 | a = [{'a':''}] | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
1 1 | #: E231 | ||
2 2 | a = (1,2) | ||
3 3 | #: E231 | ||
4 |-a[b1,:] | ||
4 |+a[b1, :] | ||
5 5 | #: E231 | ||
6 6 | a = [{'a':''}] | ||
7 7 | #: Okay | ||
|
||
E23.py:6:10: E231 [*] Missing whitespace after ':' | ||
| | ||
4 | a[b1,:] | ||
5 | #: E231 | ||
6 | a = [{'a':''}] | ||
| ^ E231 | ||
7 | #: Okay | ||
8 | a = (4,) | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
3 3 | #: E231 | ||
4 4 | a[b1,:] | ||
5 5 | #: E231 | ||
6 |-a = [{'a':''}] | ||
6 |+a = [{'a': ''}] | ||
7 7 | #: Okay | ||
8 8 | a = (4,) | ||
9 9 | b = (5, ) | ||
|
||
E23.py:19:10: E231 [*] Missing whitespace after ',' | ||
| | ||
17 | def foo() -> None: | ||
18 | #: E231 | ||
19 | if (1,2): | ||
| ^ E231 | ||
20 | pass | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
16 16 | | ||
17 17 | def foo() -> None: | ||
18 18 | #: E231 | ||
19 |- if (1,2): | ||
19 |+ if (1, 2): | ||
20 20 | pass | ||
21 21 | | ||
22 22 | #: Okay | ||
|
||
E23.py:29:20: E231 [*] Missing whitespace after ':' | ||
| | ||
27 | mdtypes_template = { | ||
28 | 'tag_full': [('mdtype', 'u4'), ('byte_count', 'u4')], | ||
29 | 'tag_smalldata':[('byte_count_mdtype', 'u4'), ('data', 'S4')], | ||
| ^ E231 | ||
30 | } | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
26 26 | #: E231:2:20 | ||
27 27 | mdtypes_template = { | ||
28 28 | 'tag_full': [('mdtype', 'u4'), ('byte_count', 'u4')], | ||
29 |- 'tag_smalldata':[('byte_count_mdtype', 'u4'), ('data', 'S4')], | ||
29 |+ 'tag_smalldata': [('byte_count_mdtype', 'u4'), ('data', 'S4')], | ||
30 30 | } | ||
31 31 | | ||
32 32 | # E231 | ||
|
||
E23.py:33:6: E231 [*] Missing whitespace after ',' | ||
| | ||
32 | # E231 | ||
33 | f"{(a,b)}" | ||
| ^ E231 | ||
34 | | ||
35 | # Okay because it's hard to differentiate between the usages of a colon in a f-string | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
30 30 | } | ||
31 31 | | ||
32 32 | # E231 | ||
33 |-f"{(a,b)}" | ||
33 |+f"{(a, b)}" | ||
34 34 | | ||
35 35 | # Okay because it's hard to differentiate between the usages of a colon in a f-string | ||
36 36 | f"{a:=1}" | ||
|
||
E23.py:47:37: E231 [*] Missing whitespace after ':' | ||
| | ||
46 | #: E231 | ||
47 | {len(f's3://{self.s3_bucket_name}/'):1} | ||
| ^ E231 | ||
48 | | ||
49 | #: Okay | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
44 44 | snapshot.file_uri[len(f's3://{self.s3_bucket_name}/'):] | ||
45 45 | | ||
46 46 | #: E231 | ||
47 |-{len(f's3://{self.s3_bucket_name}/'):1} | ||
47 |+{len(f's3://{self.s3_bucket_name}/'): 1} | ||
48 48 | | ||
49 49 | #: Okay | ||
50 50 | a = (1,) | ||
|
||
E23.py:60:13: E231 [*] Missing whitespace after ':' | ||
| | ||
58 | results = { | ||
59 | "k1": [1], | ||
60 | "k2":[2], | ||
| ^ E231 | ||
61 | } | ||
62 | results_in_tuple = ( | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
57 57 | """Primary function.""" | ||
58 58 | results = { | ||
59 59 | "k1": [1], | ||
60 |- "k2":[2], | ||
60 |+ "k2": [2], | ||
61 61 | } | ||
62 62 | results_in_tuple = ( | ||
63 63 | { | ||
|
||
E23.py:65:17: E231 [*] Missing whitespace after ':' | ||
| | ||
63 | { | ||
64 | "k1": [1], | ||
65 | "k2":[2], | ||
| ^ E231 | ||
66 | }, | ||
67 | ) | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
62 62 | results_in_tuple = ( | ||
63 63 | { | ||
64 64 | "k1": [1], | ||
65 |- "k2":[2], | ||
65 |+ "k2": [2], | ||
66 66 | }, | ||
67 67 | ) | ||
68 68 | results_in_list = [ | ||
|
||
E23.py:71:17: E231 [*] Missing whitespace after ':' | ||
| | ||
69 | { | ||
70 | "k1": [1], | ||
71 | "k2":[2], | ||
| ^ E231 | ||
72 | } | ||
73 | ] | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
68 68 | results_in_list = [ | ||
69 69 | { | ||
70 70 | "k1": [1], | ||
71 |- "k2":[2], | ||
71 |+ "k2": [2], | ||
72 72 | } | ||
73 73 | ] | ||
74 74 | results_in_list_first = [ | ||
|
||
E23.py:76:17: E231 [*] Missing whitespace after ':' | ||
| | ||
74 | results_in_list_first = [ | ||
75 | { | ||
76 | "k2":[2], | ||
| ^ E231 | ||
77 | } | ||
78 | ] | ||
| | ||
= help: Add missing whitespace | ||
|
||
ℹ Safe fix | ||
73 73 | ] | ||
74 74 | results_in_list_first = [ | ||
75 75 | { | ||
76 |- "k2":[2], | ||
76 |+ "k2": [2], | ||
77 77 | } | ||
78 78 | ] |