-
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.
add auto-fix for E223,224,242 (#8143)
## Summary Introduce auto fix for `E223`, `E224`, `E242`. This partially address #8120. ## Test Plan Already covered.
- Loading branch information
Showing
4 changed files
with
72 additions
and
10 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
13 changes: 12 additions & 1 deletion
13
.../src/rules/pycodestyle/snapshots/ruff_linter__rules__pycodestyle__tests__E223_E22.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 |
---|---|---|
@@ -1,13 +1,24 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs | ||
--- | ||
E22.py:43:2: E223 Tab before operator | ||
E22.py:43:2: E223 [*] Tab before operator | ||
| | ||
41 | #: E223 | ||
42 | foobart = 4 | ||
43 | a = 3 # aligned with tab | ||
| ^^^ E223 | ||
44 | #: | ||
| | ||
= help: Replace with single space | ||
|
||
ℹ Fix | ||
40 40 | | ||
41 41 | #: E223 | ||
42 42 | foobart = 4 | ||
43 |-a = 3 # aligned with tab | ||
43 |+a = 3 # aligned with tab | ||
44 44 | #: | ||
45 45 | | ||
46 46 | | ||
|
||
|
13 changes: 12 additions & 1 deletion
13
.../src/rules/pycodestyle/snapshots/ruff_linter__rules__pycodestyle__tests__E224_E22.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 |
---|---|---|
@@ -1,13 +1,24 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs | ||
--- | ||
E22.py:48:5: E224 Tab after operator | ||
E22.py:48:5: E224 [*] Tab after operator | ||
| | ||
47 | #: E224 | ||
48 | a += 1 | ||
| ^^^^ E224 | ||
49 | b += 1000 | ||
50 | #: | ||
| | ||
= help: Replace with single space | ||
|
||
ℹ Fix | ||
45 45 | | ||
46 46 | | ||
47 47 | #: E224 | ||
48 |-a += 1 | ||
48 |+a += 1 | ||
49 49 | b += 1000 | ||
50 50 | #: | ||
51 51 | | ||
|
||
|
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