Skip to content

Commit 91b15ab

Browse files
committed
pyflakes fixup
1 parent f263ef9 commit 91b15ab

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

pandas/core/window.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ def _shallow_copy(self, obj=None, **kwargs):
144144
kwargs[attr] = getattr(self, attr)
145145
return self._constructor(obj, **kwargs)
146146

147-
def _prep_values(self, values=None, kill_inf=True, how=None, as_float=True):
147+
def _prep_values(self, values=None, kill_inf=True, how=None,
148+
as_float=True):
148149

149150
if values is None:
150151
values = getattr(self._selected_obj, 'values', self._selected_obj)

pandas/tests/test_window.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,18 +2439,20 @@ def test_rolling_min_max_numeric_types(self):
24392439
types_test.extend([np.dtype("{}{}".format(sign, width))
24402440
for width in [1, 2, 4, 8] for sign in "ui"])
24412441
for data_type in types_test:
2442-
# Just testing that these don't throw exceptions and that the types match.
2443-
# Other tests will cover quantitative correctness
2442+
# Just testing that these don't throw exceptions and that
2443+
# the types match. Other tests will cover quantitative
2444+
# correctness
24442445
for convert_to_float in [True]:
24452446
if data_type.kind == 'f' or not convert_to_float:
2446-
# Floating point values are left as-is when convert_to_float is True.
2447-
# We compare to the original floating point type instead
2447+
# Floating point values are left as-is when
2448+
# convert_to_float is True. We compare to the
2449+
# original floating point type instead
24482450
expected_type = data_type
24492451
else:
24502452
expected_type = np.dtype(float)
2451-
result = DataFrame(np.arange(20, dtype=data_type)).rolling(window=5).max(as_float=convert_to_float)
2453+
result = (DataFrame(np.arange(20, dtype=data_type))
2454+
.rolling(window=5).max(as_float=convert_to_float))
24522455
self.assertEqual(result.dtypes[0], expected_type)
2453-
result = DataFrame(np.arange(20, dtype=data_type)).rolling(window=5).min(as_float=convert_to_float)
2456+
result = (DataFrame(np.arange(20, dtype=data_type))
2457+
.rolling(window=5).min(as_float=convert_to_float))
24542458
self.assertEqual(result.dtypes[0], expected_type)
2455-
2456-

0 commit comments

Comments
 (0)