Skip to content

Commit 5ca8b17

Browse files
committed
reduce line lengths and apply ruff-reformat changes
1 parent 33f2054 commit 5ca8b17

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

pandas/_libs/window/aggregations.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ def ewm(const float64_t[:] vals, const int64_t[:] start, const int64_t[:] end,
18141814
# avoid numerical errors on constant series
18151815
if weighted != cur:
18161816
if not adjust and com == 1:
1817-
# update alpha "on the fly" for irregular-interval time series
1817+
# update in case of irregular-interval series
18181818
new_wt = 1. - old_wt
18191819
weighted = old_wt * weighted + new_wt * cur
18201820
weighted /= (old_wt + new_wt)

pandas/tests/window/test_ewm.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ def test_ewma_times_adjust_false_with_disallowed_com():
156156
# GH 54328
157157
with pytest.raises(
158158
NotImplementedError,
159-
match=("None of com, span, or alpha can be specified "
160-
"if times is provided and adjust=False"),
159+
match=(
160+
"None of com, span, or alpha can be specified "
161+
"if times is provided and adjust=False"
162+
),
161163
):
162164
Series(range(1)).ewm(
163165
0.1,
@@ -171,8 +173,10 @@ def test_ewma_times_adjust_false_with_disallowed_alpha():
171173
# GH 54328
172174
with pytest.raises(
173175
NotImplementedError,
174-
match=("None of com, span, or alpha can be specified "
175-
"if times is provided and adjust=False"),
176+
match=(
177+
"None of com, span, or alpha can be specified "
178+
"if times is provided and adjust=False"
179+
),
176180
):
177181
Series(range(1)).ewm(
178182
0.1,
@@ -187,8 +191,10 @@ def test_ewma_times_adjust_false_with_disallowed_span():
187191
# GH 54328
188192
with pytest.raises(
189193
NotImplementedError,
190-
match=("None of com, span, or alpha can be specified "
191-
"if times is provided and adjust=False"),
194+
match=(
195+
"None of com, span, or alpha can be specified "
196+
"if times is provided and adjust=False"
197+
),
192198
):
193199
Series(range(1)).ewm(
194200
0.1,

0 commit comments

Comments
 (0)