Skip to content

Commit 4ef66bc

Browse files
author
MomIsBestFriend
committed
STY: Spaces in wrong place
1 parent c5948d1 commit 4ef66bc

18 files changed

+64
-71
lines changed

pandas/tests/arrays/categorical/test_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def test_rename_categories(self):
8787
def test_rename_categories_wrong_length_raises(self, new_categories):
8888
cat = Categorical(["a", "b", "c", "a"])
8989
msg = (
90-
"new categories need to have the same number of items as the"
91-
" old categories!"
90+
"new categories need to have the same number of items as the "
91+
"old categories!"
9292
)
9393
with pytest.raises(ValueError, match=msg):
9494
cat.rename_categories(new_categories)

pandas/tests/arrays/categorical/test_indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def test_categories_assigments(self):
157157
def test_categories_assigments_wrong_length_raises(self, new_categories):
158158
cat = Categorical(["a", "b", "c", "a"])
159159
msg = (
160-
"new categories need to have the same number of items"
161-
" as the old categories!"
160+
"new categories need to have the same number of items "
161+
"as the old categories!"
162162
)
163163
with pytest.raises(ValueError, match=msg):
164164
cat.categories = new_categories

pandas/tests/arrays/categorical/test_operators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def test_comparison_with_unknown_scalars(self):
172172
cat = Categorical([1, 2, 3], ordered=True)
173173

174174
msg = (
175-
"Cannot compare a Categorical for op __{}__ with a scalar,"
176-
" which is not a category"
175+
"Cannot compare a Categorical for op __{}__ with a scalar, "
176+
"which is not a category"
177177
)
178178
with pytest.raises(TypeError, match=msg.format("lt")):
179179
cat < 4

pandas/tests/arrays/categorical/test_repr.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ def test_categorical_repr_datetime(self):
153153
"[2011-01-01 09:00:00, 2011-01-01 10:00:00, 2011-01-01 11:00:00, "
154154
"2011-01-01 12:00:00, 2011-01-01 13:00:00]\n"
155155
"Categories (5, datetime64[ns]): [2011-01-01 09:00:00, "
156-
"2011-01-01 10:00:00, 2011-01-01 11:00:00,\n"
157-
" 2011-01-01 12:00:00, "
156+
"2011-01-01 10:00:00, 2011-01-01 11:00:00,"
157+
"\n "
158+
"2011-01-01 12:00:00, "
158159
"2011-01-01 13:00:00]"
159160
""
160161
)
@@ -167,8 +168,8 @@ def test_categorical_repr_datetime(self):
167168
"2011-01-01 10:00:00, 2011-01-01 11:00:00, 2011-01-01 12:00:00, "
168169
"2011-01-01 13:00:00]\n"
169170
"Categories (5, datetime64[ns]): [2011-01-01 09:00:00, "
170-
"2011-01-01 10:00:00, 2011-01-01 11:00:00,\n"
171-
" 2011-01-01 12:00:00, "
171+
"2011-01-01 10:00:00, 2011-01-01 11:00:00,"
172+
"\n 2011-01-01 12:00:00, "
172173
"2011-01-01 13:00:00]"
173174
)
174175

@@ -181,10 +182,10 @@ def test_categorical_repr_datetime(self):
181182
"2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00, "
182183
"2011-01-01 13:00:00-05:00]\n"
183184
"Categories (5, datetime64[ns, US/Eastern]): "
184-
"[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00,\n"
185-
" "
186-
"2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00,\n"
187-
" "
185+
"[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00,"
186+
"\n "
187+
"2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00,"
188+
"\n "
188189
"2011-01-01 13:00:00-05:00]"
189190
)
190191

@@ -198,10 +199,10 @@ def test_categorical_repr_datetime(self):
198199
"2011-01-01 10:00:00-05:00, 2011-01-01 11:00:00-05:00, "
199200
"2011-01-01 12:00:00-05:00, 2011-01-01 13:00:00-05:00]\n"
200201
"Categories (5, datetime64[ns, US/Eastern]): "
201-
"[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00,\n"
202-
" "
203-
"2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00,\n"
204-
" "
202+
"[2011-01-01 09:00:00-05:00, 2011-01-01 10:00:00-05:00,"
203+
"\n "
204+
"2011-01-01 11:00:00-05:00, 2011-01-01 12:00:00-05:00,"
205+
"\n "
205206
"2011-01-01 13:00:00-05:00]"
206207
)
207208

pandas/tests/arrays/test_integer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ def test_repr_array_long():
9898
data = integer_array([1, 2, None] * 1000)
9999
expected = (
100100
"<IntegerArray>\n"
101-
"[ 1, 2, NA, 1, 2, NA, 1, 2, NA, 1,\n"
102-
" ...\n"
103-
" NA, 1, 2, NA, 1, 2, NA, 1, 2, NA]\n"
101+
"[ 1, 2, NA, 1, 2, NA, 1, 2, NA, 1,\n "
102+
"...\n "
103+
"NA, 1, 2, NA, 1, 2, NA, 1, 2, NA]\n"
104104
"Length: 3000, dtype: Int64"
105105
)
106106
result = repr(data)

pandas/tests/arrays/test_period.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ def test_repr_large():
270270
expected = (
271271
"<PeriodArray>\n"
272272
"['2000-01-01', '2001-01-01', '2000-01-01', '2001-01-01', "
273-
"'2000-01-01',\n"
274-
" '2001-01-01', '2000-01-01', '2001-01-01', '2000-01-01', "
275-
"'2001-01-01',\n"
276-
" ...\n"
277-
" '2000-01-01', '2001-01-01', '2000-01-01', '2001-01-01', "
278-
"'2000-01-01',\n"
279-
" '2001-01-01', '2000-01-01', '2001-01-01', '2000-01-01', "
273+
"'2000-01-01',\n "
274+
"'2001-01-01', '2000-01-01', '2001-01-01', '2000-01-01', "
275+
"'2001-01-01',\n "
276+
"...\n "
277+
"'2000-01-01', '2001-01-01', '2000-01-01', '2001-01-01', "
278+
"'2000-01-01',\n "
279+
"'2001-01-01', '2000-01-01', '2001-01-01', '2000-01-01', "
280280
"'2001-01-01']\n"
281281
"Length: 1000, dtype: period[D]"
282282
)

pandas/tests/frame/methods/test_quantile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def test_quantile_axis_parameter(self):
103103
with pytest.raises(ValueError, match=msg):
104104
df.quantile(0.1, axis=-1)
105105
msg = (
106-
"No axis named column for object type"
107-
" <class 'pandas.core.frame.DataFrame'>"
106+
"No axis named column for object type "
107+
"<class 'pandas.core.frame.DataFrame'>"
108108
)
109109
with pytest.raises(ValueError, match=msg):
110110
df.quantile(0.1, axis="column")

pandas/tests/io/formats/test_format.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,8 +2402,8 @@ def test_east_asian_unicode_series(self):
24022402

24032403
s.index = ["ああ", "いいいい", "う", "えええ"]
24042404
expected = (
2405-
"ああ あ\n"
2406-
" ... \n"
2405+
"ああ あ\n "
2406+
"... \n"
24072407
"えええ ええええ\n"
24082408
"Name: おおおおおおお, Length: 4, dtype: object"
24092409
)
@@ -2659,14 +2659,14 @@ def test_format_explicit(self):
26592659
assert exp == res
26602660
res = repr(test_sers["asc"])
26612661
exp = (
2662-
"0 a\n1 ab\n ... \n4 abcde\n5"
2663-
" abcdef\ndtype: object"
2662+
"0 a\n1 ab\n ... \n4 abcde\n5 "
2663+
"abcdef\ndtype: object"
26642664
)
26652665
assert exp == res
26662666
res = repr(test_sers["desc"])
26672667
exp = (
2668-
"5 abcdef\n4 abcde\n ... \n1 ab\n0"
2669-
" a\ndtype: object"
2668+
"5 abcdef\n4 abcde\n ... \n1 ab\n0 "
2669+
"a\ndtype: object"
26702670
)
26712671
assert exp == res
26722672

pandas/tests/io/formats/test_style.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -530,20 +530,17 @@ def test_bar_align_left_0points(self):
530530
(1, 0): [
531531
"width: 10em",
532532
" height: 80%",
533-
"background: linear-gradient(90deg,#d65f5f 50.0%,"
534-
" transparent 50.0%)",
533+
"background: linear-gradient(90deg,#d65f5f 50.0%, transparent 50.0%)",
535534
],
536535
(1, 1): [
537536
"width: 10em",
538537
" height: 80%",
539-
"background: linear-gradient(90deg,#d65f5f 50.0%,"
540-
" transparent 50.0%)",
538+
"background: linear-gradient(90deg,#d65f5f 50.0%, transparent 50.0%)",
541539
],
542540
(1, 2): [
543541
"width: 10em",
544542
" height: 80%",
545-
"background: linear-gradient(90deg,#d65f5f 50.0%,"
546-
" transparent 50.0%)",
543+
"background: linear-gradient(90deg,#d65f5f 50.0%, transparent 50.0%)",
547544
],
548545
(2, 0): [
549546
"width: 10em",
@@ -572,8 +569,7 @@ def test_bar_align_left_0points(self):
572569
(0, 1): [
573570
"width: 10em",
574571
" height: 80%",
575-
"background: linear-gradient(90deg,#d65f5f 50.0%,"
576-
" transparent 50.0%)",
572+
"background: linear-gradient(90deg,#d65f5f 50.0%, transparent 50.0%)",
577573
],
578574
(0, 2): [
579575
"width: 10em",

pandas/tests/io/formats/test_to_html.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
import pandas.io.formats.format as fmt
1313

1414
lorem_ipsum = (
15-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod"
16-
" tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim"
17-
" veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex"
18-
" ea commodo consequat. Duis aute irure dolor in reprehenderit in"
19-
" voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur"
20-
" sint occaecat cupidatat non proident, sunt in culpa qui officia"
21-
" deserunt mollit anim id est laborum."
15+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod "
16+
"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim "
17+
"veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex "
18+
"ea commodo consequat. Duis aute irure dolor in reprehenderit in "
19+
"voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur "
20+
"sint occaecat cupidatat non proident, sunt in culpa qui officia "
21+
"deserunt mollit anim id est laborum."
2222
)
2323

2424

0 commit comments

Comments
 (0)