Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "# fmt: skip" directive to black (#1800)
Fixes #1162
- Loading branch information
Showing
8 changed files
with
147 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
a, b = 1, 2 | ||
c = 6 # fmt: skip | ||
d = 5 |
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,17 @@ | ||
l1 = ["This list should be broken up", "into multiple lines", "because it is way too long"] | ||
l2 = ["But this list shouldn't", "even though it also has", "way too many characters in it"] # fmt: skip | ||
l3 = ["I have", "trailing comma", "so I should be braked",] | ||
|
||
# output | ||
|
||
l1 = [ | ||
"This list should be broken up", | ||
"into multiple lines", | ||
"because it is way too long", | ||
] | ||
l2 = ["But this list shouldn't", "even though it also has", "way too many characters in it"] # fmt: skip | ||
l3 = [ | ||
"I have", | ||
"trailing comma", | ||
"so I should be braked", | ||
] |
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,20 @@ | ||
a = 3 | ||
# fmt: off | ||
b, c = 1, 2 | ||
d = 6 # fmt: skip | ||
e = 5 | ||
# fmt: on | ||
f = ["This is a very long line that should be formatted into a clearer line ", "by rearranging."] | ||
|
||
# output | ||
|
||
a = 3 | ||
# fmt: off | ||
b, c = 1, 2 | ||
d = 6 # fmt: skip | ||
e = 5 | ||
# fmt: on | ||
f = [ | ||
"This is a very long line that should be formatted into a clearer line ", | ||
"by rearranging.", | ||
] |
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,13 @@ | ||
a = 2 | ||
# fmt: skip | ||
l = [1, 2, 3,] | ||
|
||
# output | ||
|
||
a = 2 | ||
# fmt: skip | ||
l = [ | ||
1, | ||
2, | ||
3, | ||
] |
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,22 @@ | ||
a, b, c = 3, 4, 5 | ||
if ( | ||
a == 3 | ||
and b != 9 # fmt: skip | ||
and c is not None | ||
): | ||
print("I'm good!") | ||
else: | ||
print("I'm bad") | ||
|
||
|
||
# output | ||
|
||
a, b, c = 3, 4, 5 | ||
if ( | ||
a == 3 | ||
and b != 9 # fmt: skip | ||
and c is not None | ||
): | ||
print("I'm good!") | ||
else: | ||
print("I'm bad") |
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