Skip to content

Commit 297c98d

Browse files
committed
STY: Added zip strict to pandas/test/arithmetic
1 parent fa1360d commit 297c98d

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

pandas/tests/arithmetic/test_interval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def elementwise_comparison(self, op, interval_array, other):
107107
Helper that performs elementwise comparisons between `array` and `other`
108108
"""
109109
other = other if is_list_like(other) else [other] * len(interval_array)
110-
expected = np.array([op(x, y) for x, y in zip(interval_array, other)])
110+
expected = np.array([op(x, y) for x, y in zip(interval_array, other, strict=True)])
111111
if isinstance(other, Series):
112112
return Series(expected, index=other.index)
113113
return expected

pandas/tests/arithmetic/test_period.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,11 +962,11 @@ def test_pi_add_sub_int_array_freqn_gt1(self):
962962
pi = period_range("2016-01-01", periods=10, freq="2D")
963963
arr = np.arange(10)
964964
result = pi + arr
965-
expected = pd.Index([x + y for x, y in zip(pi, arr)])
965+
expected = pd.Index([x + y for x, y in zip(pi, arr, strict=True)])
966966
tm.assert_index_equal(result, expected)
967967

968968
result = pi - arr
969-
expected = pd.Index([x - y for x, y in zip(pi, arr)])
969+
expected = pd.Index([x - y for x, y in zip(pi, arr, strict=True)])
970970
tm.assert_index_equal(result, expected)
971971

972972
def test_pi_sub_isub_offset(self):

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,6 @@ exclude = [
463463
"pandas/_testing/asserters.py" = ["B905"]
464464
"pandas/_testing/_warnings.py" = ["B905"]
465465
"pandas/tests/apply/test_series_apply.py" = ["B905"]
466-
"pandas/tests/arithmetic/test_interval.py" = ["B905"]
467-
"pandas/tests/arithmetic/test_numeric.py" = ["B905"]
468-
"pandas/tests/arithmetic/test_period.py" = ["B905"]
469466
"pandas/tests/arrays/categorical/test_map.py" = ["B905"]
470467
"pandas/tests/arrays/integer/test_construction.py" = ["B905"]
471468
"pandas/tests/arrays/integer/test_function.py" = ["B905"]

0 commit comments

Comments
 (0)