diff --git a/pandas/tests/arithmetic/test_interval.py b/pandas/tests/arithmetic/test_interval.py index 0e316cf419cb0..e2353da0dad56 100644 --- a/pandas/tests/arithmetic/test_interval.py +++ b/pandas/tests/arithmetic/test_interval.py @@ -107,7 +107,9 @@ def elementwise_comparison(self, op, interval_array, other): Helper that performs elementwise comparisons between `array` and `other` """ other = other if is_list_like(other) else [other] * len(interval_array) - expected = np.array([op(x, y) for x, y in zip(interval_array, other)]) + expected = np.array( + [op(x, y) for x, y in zip(interval_array, other, strict=True)] + ) if isinstance(other, Series): return Series(expected, index=other.index) return expected diff --git a/pandas/tests/arithmetic/test_period.py b/pandas/tests/arithmetic/test_period.py index 7756719654657..54a5625437ace 100644 --- a/pandas/tests/arithmetic/test_period.py +++ b/pandas/tests/arithmetic/test_period.py @@ -962,11 +962,11 @@ def test_pi_add_sub_int_array_freqn_gt1(self): pi = period_range("2016-01-01", periods=10, freq="2D") arr = np.arange(10) result = pi + arr - expected = pd.Index([x + y for x, y in zip(pi, arr)]) + expected = pd.Index([x + y for x, y in zip(pi, arr, strict=True)]) tm.assert_index_equal(result, expected) result = pi - arr - expected = pd.Index([x - y for x, y in zip(pi, arr)]) + expected = pd.Index([x - y for x, y in zip(pi, arr, strict=True)]) tm.assert_index_equal(result, expected) def test_pi_sub_isub_offset(self): diff --git a/pyproject.toml b/pyproject.toml index 12a5633f136cc..cd151ad7bbe27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -463,9 +463,6 @@ exclude = [ "pandas/_testing/asserters.py" = ["B905"] "pandas/_testing/_warnings.py" = ["B905"] "pandas/tests/apply/test_series_apply.py" = ["B905"] -"pandas/tests/arithmetic/test_interval.py" = ["B905"] -"pandas/tests/arithmetic/test_numeric.py" = ["B905"] -"pandas/tests/arithmetic/test_period.py" = ["B905"] "pandas/tests/arrays/categorical/test_map.py" = ["B905"] "pandas/tests/arrays/integer/test_construction.py" = ["B905"] "pandas/tests/arrays/integer/test_function.py" = ["B905"]