Make mypy work again #8

Merged
alexander merged 16 commits from fix-mypy into develop 2026-11-30 14:13:44 +01:00
Showing only changes of commit 295a271ad7 - Show all commits

Remove no longer needed "# type: ignore" comments

With the ORM columns annotated, `mypy` understands these lines on its own
Alexander Hess 2026-11-30 13:10:07 +01:00
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -299,7 +299,7 @@ class OrderHistory:
# Take only the counts at the `predict_at` time.
training_ts = intra_pixel.loc[
first_start_at : last_start_at : self._n_daily_time_steps, # type:ignore
first_start_at : last_start_at : self._n_daily_time_steps,
"n_orders",
]
if len(training_ts) != frequency * train_horizon:
@ -370,7 +370,7 @@ class OrderHistory:
# Take all the counts between `first_train_day` and `last_train_day`.
training_ts = intra_pixel.loc[
first_start_at:last_start_at, # type:ignore
first_start_at:last_start_at,
"n_orders",
]
if len(training_ts) != frequency * train_horizon:
@ -392,7 +392,7 @@ class OrderHistory:
) - dt.timedelta(minutes=self._time_step)
actuals_ts = intra_pixel.loc[
first_prediction_at:last_prediction_at, # type:ignore
first_prediction_at:last_prediction_at,
"n_orders",
]
if not len(actuals_ts): # pragma: no cover
@ -470,7 +470,7 @@ class OrderHistory:
# Take all the counts between `first_train_day` and `last_train_day`,
# including the ones on the `predict_at` day prior to `predict_at`.
training_ts = intra_pixel.loc[
first_start_at:last_start_at, # type:ignore
first_start_at:last_start_at,
"n_orders",
]
n_time_steps_on_predict_day = (