Skip to content

Commit b147c67

Browse files
committed
STY: Fix line length to comply with E501
I broke long lines into multiple lines to comply with the 88-character line length limit enforced by ruff. Files fixed: - base/methods.py:353 - Split list comprehension with zip across multiple lines - test_interval.py:37 - Split list comprehension with zip across multiple lines This addresses the pre-commit.ci E501 failures.
1 parent a001b0f commit b147c67

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

pandas/tests/extension/base/methods.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,12 @@ def test_combine_le(self, data_repeated):
350350
result = s1.combine(s2, lambda x1, x2: x1 <= x2)
351351
expected = pd.Series(
352352
pd.array(
353-
[a <= b for (a, b) in zip(list(orig_data1), list(orig_data2), strict=True)],
353+
[
354+
a <= b
355+
for (a, b) in zip(
356+
list(orig_data1), list(orig_data2), strict=True
357+
)
358+
],
354359
dtype=self._combine_le_expected_dtype,
355360
)
356361
)

pandas/tests/extension/test_interval.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
def make_data(n: int):
3535
left_array = np.random.default_rng(2).uniform(size=n).cumsum()
3636
right_array = left_array + np.random.default_rng(2).uniform(size=n)
37-
return [Interval(left, right) for left, right in zip(left_array, right_array, strict=True)]
37+
return [
38+
Interval(left, right)
39+
for left, right in zip(left_array, right_array, strict=True)
40+
]
3841

3942

4043
@pytest.fixture

0 commit comments

Comments
 (0)