Skip to content

Commit e88ae97

Browse files
committed
CLN remove unnecessary trailing commas in groupby tests
1 parent 0bc407a commit e88ae97

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

pandas/tests/groupby/test_apply.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -946,9 +946,7 @@ def fct(group):
946946
tm.assert_series_equal(result, expected)
947947

948948

949-
@pytest.mark.parametrize(
950-
"function", [lambda gr: gr.index, lambda gr: gr.index + 1 - 1],
951-
)
949+
@pytest.mark.parametrize("function", [lambda gr: gr.index, lambda gr: gr.index + 1 - 1])
952950
def test_apply_function_index_return(function):
953951
# GH: 22541
954952
df = pd.DataFrame([1, 2, 2, 2, 1, 2, 3, 1, 3, 1], columns=["id"])

pandas/tests/groupby/test_categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
def cartesian_product_for_groupers(result, args, names, fill_value=np.NaN):
20-
""" Reindex to a cartesian production for the groupers,
20+
"""Reindex to a cartesian production for the groupers,
2121
preserving the nature (Categorical) of each grouper
2222
"""
2323

pandas/tests/groupby/test_groupby_dropna.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,7 @@ def test_groupby_dropna_multi_index_dataframe_agg(dropna, tuples, outputs):
246246
(pd.Period("2020-01-01"), pd.Period("2020-02-01")),
247247
],
248248
)
249-
@pytest.mark.parametrize(
250-
"dropna, values", [(True, [12, 3]), (False, [12, 3, 6],)],
251-
)
249+
@pytest.mark.parametrize("dropna, values", [(True, [12, 3]), (False, [12, 3, 6])])
252250
def test_groupby_dropna_datetime_like_data(
253251
dropna, values, datetime1, datetime2, unique_nulls_fixture, unique_nulls_fixture2
254252
):

pandas/tests/groupby/test_groupby_subclass.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ def test_groupby_preserves_subclass(obj, groupby_func):
5151
tm.assert_series_equal(result1, result2)
5252

5353

54-
@pytest.mark.parametrize(
55-
"obj", [DataFrame, tm.SubclassedDataFrame],
56-
)
54+
@pytest.mark.parametrize("obj", [DataFrame, tm.SubclassedDataFrame])
5755
def test_groupby_resample_preserves_subclass(obj):
5856
# GH28330 -- preserve subclass through groupby.resample()
5957

pandas/tests/groupby/test_size.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_size_on_categorical(as_index):
5353
result = df.groupby(["A", "B"], as_index=as_index).size()
5454

5555
expected = DataFrame(
56-
[[1, 1, 1], [1, 2, 0], [2, 1, 0], [2, 2, 1]], columns=["A", "B", "size"],
56+
[[1, 1, 1], [1, 2, 0], [2, 1, 0], [2, 2, 1]], columns=["A", "B", "size"]
5757
)
5858
expected["A"] = expected["A"].astype("category")
5959
if as_index:

pandas/tests/groupby/test_timegrouper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,6 @@ def test_grouper_period_index(self):
780780
result = period_series.groupby(period_series.index.month).sum()
781781

782782
expected = pd.Series(
783-
range(0, periods), index=Index(range(1, periods + 1), name=index.name),
783+
range(0, periods), index=Index(range(1, periods + 1), name=index.name)
784784
)
785785
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)