Skip to content

Commit fbbfe46

Browse files
committed
lint
1 parent a908700 commit fbbfe46

File tree

7 files changed

+11
-18
lines changed

7 files changed

+11
-18
lines changed

pandas/tests/extension/base/methods.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,5 +703,8 @@ def test_round(self, data):
703703
if not data.dtype._is_numeric:
704704
pytest.skip("Round is only valid for numeric dtypes")
705705
result = pd.Series(data).round()
706-
expected = pd.Series([np.round(element) if pd.notna(element) else element for element in data], dtype=data.dtype)
706+
expected = pd.Series(
707+
[np.round(element) if pd.notna(element) else element for element in data],
708+
dtype=data.dtype,
709+
)
707710
tm.assert_series_equal(result, expected)

pandas/tests/extension/decimal/test_decimal.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,8 @@ def test_invert(self, data):
226226
@pytest.mark.parametrize("ufunc", [np.positive, np.negative, np.abs])
227227
def test_unary_ufunc_dunder_equivalence(self, data, ufunc):
228228
super().test_unary_ufunc_dunder_equivalence(data, ufunc)
229-
230-
@pytest.mark.xfail(
231-
reason="DecimalArray.round is not implemented."
232-
)
229+
230+
@pytest.mark.xfail(reason="DecimalArray.round is not implemented.")
233231
def test_round(self, data):
234232
super().test_round(data)
235233

pandas/tests/extension/test_arrow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ def _get_arith_xfail_marker(self, opname, pa_dtype):
10111011
)
10121012

10131013
return mark
1014-
1014+
10151015
def test_round(self, data, request):
10161016
mark = pytest.mark.xfail(
10171017
# raises=pa.ArrowInvalid,

pandas/tests/extension/test_interval.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ def test_EA_types(self, engine, data):
9595
def test_invert(self, data):
9696
super().test_invert(data)
9797

98-
@pytest.mark.xfail(
99-
reason="Round is not valid for IntervalArray."
100-
)
98+
@pytest.mark.xfail(reason="Round is not valid for IntervalArray.")
10199
def test_round(self, data):
102100
super().test_round(data)
103101

pandas/tests/extension/test_masked.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def test_invert(self, data, request):
358358
)
359359
request.node.add_marker(mark)
360360
super().test_invert(data)
361-
361+
362362
def test_round(self, data, request):
363363
if data.dtype == "boolean":
364364
mark = pytest.mark.xfail(reason="Cannot round boolean dtype")
@@ -368,5 +368,3 @@ def test_round(self, data, request):
368368

369369
class Test2DCompat(base.Dim2CompatTests):
370370
pass
371-
372-

pandas/tests/extension/test_numpy.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,7 @@ def test_insert_invalid(self, data, invalid_scalar):
270270
# NumpyExtensionArray[object] can hold anything, so skip
271271
super().test_insert_invalid(data, invalid_scalar)
272272

273-
@pytest.mark.xfail(
274-
reason="NumpyExtensionArray.round is not implemented."
275-
)
273+
@pytest.mark.xfail(reason="NumpyExtensionArray.round is not implemented.")
276274
def test_round(self, data):
277275
super().test_round(data)
278276

pandas/tests/extension/test_sparse.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,7 @@ def test_map_raises(self, data, na_action):
346346
with pytest.raises(ValueError, match=msg):
347347
data.map(lambda x: np.nan, na_action=na_action)
348348

349-
@pytest.mark.xfail(
350-
reason="SpareArray.round not implemented."
351-
)
349+
@pytest.mark.xfail(reason="SpareArray.round not implemented.")
352350
def test_round(self, data):
353351
super().test_round(data)
354352

0 commit comments

Comments
 (0)