Skip to content

Commit bfece49

Browse files
style: fix ruff lint errors in seasonal tests
- Remove unused pytest import - Remove unused ci variable assignment - Fix line length (89 > 88) - Fix import sorting
1 parent 50b3737 commit bfece49

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/test_seasonal_smoother.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66

77
import numpy as np
88
import pandas as pd
9-
import pytest
109
from causal_impact import CausalImpact
1110

12-
1311
MCMC_ARGS_FAST = {"niter": 500, "nwarmup": 200, "seed": 42, "prior_level_sd": 0.01}
1412
MCMC_ARGS_MEDIUM = {"niter": 2000, "nwarmup": 500, "seed": 42, "prior_level_sd": 0.01}
1513

@@ -36,7 +34,7 @@ class TestSeasonalSmootherIntegration:
3634
def test_sigma_seasonal_exists_when_nseasons_set(self):
3735
"""nseasons > 1 のとき sigma_seasonal が非空であること."""
3836
df, pre, post = _make_seasonal_df()
39-
ci = CausalImpact(
37+
CausalImpact(
4038
df, pre, post, model_args={**MCMC_ARGS_FAST, "nseasons": 7}
4139
)
4240
from causal_impact._core import run_gibbs_sampler
@@ -85,7 +83,8 @@ def test_sigma_seasonal_len_equals_post_warmup(self):
8583
niter, nwarmup = 100, 30
8684
y = [20.0 + np.sin(2 * np.pi * i / 7) for i in range(84)]
8785
result = run_gibbs_sampler(
88-
y, None, 56, niter, nwarmup, 1, 42, 0.01, 1.0, 7.0, 1.0, False, "local_level"
86+
y, None, 56, niter, nwarmup, 1, 42,
87+
0.01, 1.0, 7.0, 1.0, False, "local_level",
8988
)
9089
assert len(result.sigma_seasonal) == niter
9190

0 commit comments

Comments
 (0)