Skip to content

Commit 00483a1

Browse files
Sarthak Vineet KumarSarthak
Sarthak Vineet Kumar
and
Sarthak
authored
cleared commas (#36073)
Co-authored-by: Sarthak <[email protected]>
1 parent f635d17 commit 00483a1

9 files changed

+15
-21
lines changed

pandas/tests/scalar/test_na_scalar.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_pow_special(value, asarray):
111111

112112

113113
@pytest.mark.parametrize(
114-
"value", [1, 1.0, True, np.bool_(True), np.int_(1), np.float_(1)],
114+
"value", [1, 1.0, True, np.bool_(True), np.int_(1), np.float_(1)]
115115
)
116116
@pytest.mark.parametrize("asarray", [True, False])
117117
def test_rpow_special(value, asarray):
@@ -128,9 +128,7 @@ def test_rpow_special(value, asarray):
128128
assert result == value
129129

130130

131-
@pytest.mark.parametrize(
132-
"value", [-1, -1.0, np.int_(-1), np.float_(-1)],
133-
)
131+
@pytest.mark.parametrize("value", [-1, -1.0, np.int_(-1), np.float_(-1)])
134132
@pytest.mark.parametrize("asarray", [True, False])
135133
def test_rpow_minus_one(value, asarray):
136134
if asarray:
@@ -193,9 +191,7 @@ def test_logical_not():
193191
assert ~NA is NA
194192

195193

196-
@pytest.mark.parametrize(
197-
"shape", [(3,), (3, 3), (1, 2, 3)],
198-
)
194+
@pytest.mark.parametrize("shape", [(3,), (3, 3), (1, 2, 3)])
199195
def test_arithmetic_ndarray(shape, all_arithmetic_functions):
200196
op = all_arithmetic_functions
201197
a = np.zeros(shape)

pandas/tests/scalar/timestamp/test_arithmetic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def test_add_int_with_freq(self, ts, other):
213213
with pytest.raises(TypeError, match=msg):
214214
other - ts
215215

216-
@pytest.mark.parametrize("shape", [(6,), (2, 3,)])
216+
@pytest.mark.parametrize("shape", [(6,), (2, 3)])
217217
def test_addsub_m8ndarray(self, shape):
218218
# GH#33296
219219
ts = Timestamp("2020-04-04 15:45")
@@ -237,7 +237,7 @@ def test_addsub_m8ndarray(self, shape):
237237
with pytest.raises(TypeError, match=msg):
238238
other - ts
239239

240-
@pytest.mark.parametrize("shape", [(6,), (2, 3,)])
240+
@pytest.mark.parametrize("shape", [(6,), (2, 3)])
241241
def test_addsub_m8ndarray_tzaware(self, shape):
242242
# GH#33296
243243
ts = Timestamp("2020-04-04 15:45", tz="US/Pacific")

pandas/tests/series/methods/test_argsort.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class TestSeriesArgsort:
99
def _check_accum_op(self, name, ser, check_dtype=True):
1010
func = getattr(np, name)
1111
tm.assert_numpy_array_equal(
12-
func(ser).values, func(np.array(ser)), check_dtype=check_dtype,
12+
func(ser).values, func(np.array(ser)), check_dtype=check_dtype
1313
)
1414

1515
# with missing values

pandas/tests/series/methods/test_convert_dtypes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ class TestSeriesConvertDtypes:
219219
pd.to_datetime(["2020-01-14 10:00", "2020-01-15 11:11"]),
220220
object,
221221
{
222-
((True,), (True, False), (True, False), (True, False),): np.dtype(
222+
((True,), (True, False), (True, False), (True, False)): np.dtype(
223223
"datetime64[ns]"
224224
),
225-
((False,), (True, False), (True, False), (True, False),): np.dtype(
225+
((False,), (True, False), (True, False), (True, False)): np.dtype(
226226
"O"
227227
),
228228
},

pandas/tests/series/methods/test_drop_duplicates.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def test_drop_duplicates_categorical_non_bool(self, dtype, ordered):
141141
def test_drop_duplicates_categorical_bool(self, ordered):
142142
tc = Series(
143143
Categorical(
144-
[True, False, True, False], categories=[True, False], ordered=ordered,
144+
[True, False, True, False], categories=[True, False], ordered=ordered
145145
)
146146
)
147147

pandas/tests/series/methods/test_interpolate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
]
3131
)
3232
def nontemporal_method(request):
33-
""" Fixture that returns an (method name, required kwargs) pair.
33+
"""Fixture that returns an (method name, required kwargs) pair.
3434
3535
This fixture does not include method 'time' as a parameterization; that
3636
method requires a Series with a DatetimeIndex, and is generally tested
@@ -60,7 +60,7 @@ def nontemporal_method(request):
6060
]
6161
)
6262
def interp_methods_ind(request):
63-
""" Fixture that returns a (method name, required kwargs) pair to
63+
"""Fixture that returns a (method name, required kwargs) pair to
6464
be tested for various Index types.
6565
6666
This fixture does not include methods - 'time', 'index', 'nearest',

pandas/tests/series/methods/test_unstack.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ def test_unstack_tuplename_in_multiindex():
7575

7676
expected = pd.DataFrame(
7777
[[1, 1, 1], [1, 1, 1], [1, 1, 1]],
78-
columns=pd.MultiIndex.from_tuples(
79-
[("a",), ("b",), ("c",)], names=[("A", "a")],
80-
),
78+
columns=pd.MultiIndex.from_tuples([("a",), ("b",), ("c",)], names=[("A", "a")]),
8179
index=pd.Index([1, 2, 3], name=("B", "b")),
8280
)
8381
tm.assert_frame_equal(result, expected)
@@ -115,7 +113,7 @@ def test_unstack_mixed_type_name_in_multiindex(
115113
result = ser.unstack(unstack_idx)
116114

117115
expected = pd.DataFrame(
118-
expected_values, columns=expected_columns, index=expected_index,
116+
expected_values, columns=expected_columns, index=expected_index
119117
)
120118
tm.assert_frame_equal(result, expected)
121119

pandas/tests/series/test_cumulative.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def _check_accum_op(name, series, check_dtype=True):
1818
func = getattr(np, name)
1919
tm.assert_numpy_array_equal(
20-
func(series).values, func(np.array(series)), check_dtype=check_dtype,
20+
func(series).values, func(np.array(series)), check_dtype=check_dtype
2121
)
2222

2323
# with missing values

pandas/tests/test_algos.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ def test_isin_int_df_string_search(self):
944944
@pytest.mark.xfail(reason="problem related with issue #34125")
945945
def test_isin_nan_df_string_search(self):
946946
"""Comparing df with nan value (np.nan,2) with a string at isin() ("NaN")
947-
-> should not match values because np.nan is not equal str NaN """
947+
-> should not match values because np.nan is not equal str NaN"""
948948
df = pd.DataFrame({"values": [np.nan, 2]})
949949
result = df.isin(["NaN"])
950950
expected_false = pd.DataFrame({"values": [False, False]})

0 commit comments

Comments
 (0)