Skip to content

Commit 968f258

Browse files
committed
apply black
1 parent 8cd28a3 commit 968f258

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed

tabulate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2762,7 +2762,7 @@ def _main():
27622762
print(usage)
27632763
sys.exit(0)
27642764
files = [sys.stdin] if not args else args
2765-
with (sys.stdout if outfile == "-" else open(outfile, "w")) as out:
2765+
with sys.stdout if outfile == "-" else open(outfile, "w") as out:
27662766
for f in files:
27672767
if f == "-":
27682768
f = sys.stdin

test/test_cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
"""
44

5-
65
import os
76
import sys
87

test/test_internal.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,16 @@ def test_wrap_text_wide_chars():
180180
except ImportError:
181181
skip("test_wrap_text_wide_chars is skipped")
182182

183-
rows = [["청자청자청자청자청자", "약간 감싸면 더 잘 보일 수있는 다소 긴 설명입니다"]]
183+
rows = [
184+
["청자청자청자청자청자", "약간 감싸면 더 잘 보일 수있는 다소 긴 설명입니다"]
185+
]
184186
widths = [5, 20]
185-
expected = [["청자\n청자\n청자\n청자\n청자", "약간 감싸면 더 잘\n보일 수있는 다소 긴\n설명입니다"]]
187+
expected = [
188+
[
189+
"청자\n청자\n청자\n청자\n청자",
190+
"약간 감싸면 더 잘\n보일 수있는 다소 긴\n설명입니다",
191+
]
192+
]
186193
result = T._wrap_text_to_colwidths(rows, widths)
187194

188195
assert_equal(expected, result)
@@ -239,7 +246,14 @@ def test_wrap_text_to_colwidths_colors_wide_char():
239246
except ImportError:
240247
skip("test_wrap_text_to_colwidths_colors_wide_char is skipped")
241248

242-
data = [[("\033[31m약간 감싸면 더 잘 보일 수있는 다소 긴" " 설명입니다 설명입니다 설명입니다 설명입니다 설명\033[0m")]]
249+
data = [
250+
[
251+
(
252+
"\033[31m약간 감싸면 더 잘 보일 수있는 다소 긴"
253+
" 설명입니다 설명입니다 설명입니다 설명입니다 설명\033[0m"
254+
)
255+
]
256+
]
243257
result = T._wrap_text_to_colwidths(data, [30])
244258

245259
expected = [

test/test_output.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ def test_plain_maxcolwidth_autowraps_wide_chars():
136136

137137
table = [
138138
["hdr", "fold"],
139-
["1", "약간 감싸면 더 잘 보일 수있는 다소 긴 설명입니다 설명입니다 설명입니다 설명입니다 설명"],
139+
[
140+
"1",
141+
"약간 감싸면 더 잘 보일 수있는 다소 긴 설명입니다 설명입니다 설명입니다 설명입니다 설명",
142+
],
140143
]
141144
expected = "\n".join(
142145
[

test/test_textwrapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ def test_wrap_color_in_single_line():
143143

144144
def test_wrap_color_line_splillover():
145145
"""TextWrapper: Wrap a line - preserve internal color tags and wrap them to
146-
other lines when required, requires adding the colors tags to other lines as appropriate"""
146+
other lines when required, requires adding the colors tags to other lines as appropriate
147+
"""
147148
# This has both a text color and a background color
148149
data = "This is a \033[31mtest string for testing TextWrap\033[0m with colors"
149150

0 commit comments

Comments
 (0)