Skip to content

Commit 2baf788

Browse files
ShaharNavehTomAugspurger
authored andcommitted
STY: Spaces in wrong place (#30781)
* STY: Spaces in wrong place
1 parent a879f03 commit 2baf788

File tree

15 files changed

+39
-47
lines changed

15 files changed

+39
-47
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/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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

pandas/tests/io/test_stata.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,8 +1296,8 @@ def test_write_variable_label_errors(self):
12961296
}
12971297

12981298
msg = (
1299-
"Variable labels must contain only characters that can be"
1300-
" encoded in Latin-1"
1299+
"Variable labels must contain only characters that can be "
1300+
"encoded in Latin-1"
13011301
)
13021302
with pytest.raises(ValueError, match=msg):
13031303
with tm.ensure_clean() as path:
@@ -1467,8 +1467,8 @@ def test_out_of_range_float(self):
14671467

14681468
original.loc[2, "ColumnTooBig"] = np.inf
14691469
msg = (
1470-
"Column ColumnTooBig has a maximum value of infinity which"
1471-
" is outside the range supported by Stata"
1470+
"Column ColumnTooBig has a maximum value of infinity which "
1471+
"is outside the range supported by Stata"
14721472
)
14731473
with pytest.raises(ValueError, match=msg):
14741474
with tm.ensure_clean() as path:

pandas/tests/series/indexing/test_boolean.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ def test_where_error():
285285
with pytest.raises(ValueError, match=msg):
286286
s[[True, False]] = [0, 2, 3]
287287
msg = (
288-
"NumPy boolean array indexing assignment cannot assign 0 input"
289-
" values to the 1 output values where the mask is true"
288+
"NumPy boolean array indexing assignment cannot assign 0 input "
289+
"values to the 1 output values where the mask is true"
290290
)
291291
with pytest.raises(ValueError, match=msg):
292292
s[[True, False]] = []

pandas/tests/series/indexing/test_indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ def test_getitem_dataframe():
294294
s = pd.Series(10, index=rng)
295295
df = pd.DataFrame(rng, index=rng)
296296
msg = (
297-
"Indexing a Series with DataFrame is not supported,"
298-
" use the appropriate DataFrame column"
297+
"Indexing a Series with DataFrame is not supported, "
298+
"use the appropriate DataFrame column"
299299
)
300300
with pytest.raises(TypeError, match=msg):
301301
s[df > 5]

0 commit comments

Comments
 (0)