Upgrade wemake-python-styleguide

This commit is contained in:
Alexander Hess 2026-11-24 16:46:28 +01:00
commit e94ade4c88
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
3 changed files with 326 additions and 154 deletions

View file

@ -49,11 +49,12 @@ def vertical_datetime_index():
`frequency` of `7` times the number of daily time steps,
which is `12` for `LONG_TIME_STEP` values.
"""
start_ats = pd.date_range(
test_config.START, test_config.END, freq=f'{test_config.LONG_TIME_STEP}T',
)
gen = (
start_at
for start_at in pd.date_range(
test_config.START, test_config.END, freq=f'{test_config.LONG_TIME_STEP}T',
)
for start_at in start_ats
if config.SERVICE_START <= start_at.hour < config.SERVICE_END
)
@ -101,12 +102,13 @@ def order_totals(good_pixel_id):
"""
pixel_ids = [good_pixel_id, good_pixel_id + 1]
start_ats = pd.date_range(
test_config.START, test_config.END, freq=f'{test_config.LONG_TIME_STEP}T',
)
gen = (
(pixel_id, start_at)
for pixel_id in pixel_ids
for start_at in pd.date_range(
test_config.START, test_config.END, freq=f'{test_config.LONG_TIME_STEP}T',
)
for start_at in start_ats
if config.SERVICE_START <= start_at.hour < config.SERVICE_END
)

View file

@ -27,11 +27,12 @@ def forecast_interval():
future_day.year, future_day.month, future_day.day, config.SERVICE_END, 0,
)
start_ats = pd.date_range(
first_start_at, end_of_day, freq=f'{test_config.LONG_TIME_STEP}T',
)
gen = (
start_at
for start_at in pd.date_range(
first_start_at, end_of_day, freq=f'{test_config.LONG_TIME_STEP}T',
)
for start_at in start_ats
if config.SERVICE_START <= start_at.hour < config.SERVICE_END
)

View file

@ -131,7 +131,7 @@ class TestChooseTacticalModel:
def test_best_model_for_unknown_train_horizon(
self, order_history, good_pixel_id, predict_at, # noqa:RST215
):
"""For `train_horizon`s not included in the rule-based system ...
"""For `train_horizon` values not included in the rule-based system ...
... the method raises a `RuntimeError`.
"""