Skip to content

Commit eef7d59

Browse files
committed
TST/CLN: reformat (pandas-dev#7002)
1 parent e3a49fe commit eef7d59

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

pandas/tests/groupby/test_apply.py

+16-16
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import pytest
66

77
import pandas as pd
8-
from pandas import DataFrame, Index, MultiIndex, Series, bdate_range
98
import pandas._testing as tm
9+
from pandas import DataFrame, Index, MultiIndex, Series, bdate_range
1010

1111

1212
def test_apply_issues():
@@ -65,8 +65,8 @@ def test_apply_trivial():
6565

6666
@pytest.mark.xfail(
6767
reason="GH#20066; function passed into apply "
68-
"returns a DataFrame with the same index "
69-
"as the one to create GroupBy object."
68+
"returns a DataFrame with the same index "
69+
"as the one to create GroupBy object."
7070
)
7171
def test_apply_trivial_fail():
7272
# GH 20066
@@ -124,14 +124,14 @@ def f(g):
124124
(DataFrame({"a": [1, 1, 1, 2, 2, 1, 1, 2], "b": range(8)}), [1, 2]),
125125
(DataFrame({"a": [1, 2, 3, 1, 2, 3], "two": [4, 5, 6, 7, 8, 9]}), [1, 2, 3]),
126126
(
127-
DataFrame(
128-
{
129-
"a": list("aaabbbcccc"),
130-
"B": [3, 4, 3, 6, 5, 2, 1, 9, 5, 4],
131-
"C": [4, 0, 2, 2, 2, 7, 8, 6, 2, 8],
132-
}
133-
),
134-
["a", "b", "c"],
127+
DataFrame(
128+
{
129+
"a": list("aaabbbcccc"),
130+
"B": [3, 4, 3, 6, 5, 2, 1, 9, 5, 4],
131+
"C": [4, 0, 2, 2, 2, 7, 8, 6, 2, 8],
132+
}
133+
),
134+
["a", "b", "c"],
135135
),
136136
(DataFrame([[1, 2, 3], [2, 2, 3]], columns=["a", "b", "c"]), [1, 2]),
137137
],
@@ -155,6 +155,7 @@ def test_group_apply_once_per_group(df, group_names):
155155
# once per group
156156

157157
names = []
158+
158159
# cannot parameterize over the functions since they need external
159160
# `names` to detect side effects
160161

@@ -683,7 +684,6 @@ def func_with_date(batch):
683684

684685

685686
def test_gb_apply_list_of_unequal_len_arrays():
686-
687687
# GH1738
688688
df = DataFrame(
689689
{
@@ -897,12 +897,12 @@ def test_apply_index_has_complex_internals(index):
897897
(lambda x: set(x.index.to_list()), [{0, 1}, {2, 3}]),
898898
(lambda x: tuple(x.index.to_list()), [(0, 1), (2, 3)]),
899899
(
900-
lambda x: {n: i for (n, i) in enumerate(x.index.to_list())},
901-
[{0: 0, 1: 1}, {0: 2, 1: 3}],
900+
lambda x: {n: i for (n, i) in enumerate(x.index.to_list())},
901+
[{0: 0, 1: 1}, {0: 2, 1: 3}],
902902
),
903903
(
904-
lambda x: [{n: i} for (n, i) in enumerate(x.index.to_list())],
905-
[[{0: 0}, {1: 1}], [{0: 2}, {1: 3}]],
904+
lambda x: [{n: i} for (n, i) in enumerate(x.index.to_list())],
905+
[[{0: 0}, {1: 1}], [{0: 2}, {1: 3}]],
906906
),
907907
],
908908
)

0 commit comments

Comments
 (0)