Make mypy as strict as practical #13
1 changed files with 4 additions and 4 deletions
commit
081d6f7fd9
|
|
@ -255,7 +255,7 @@ class OrderHistory:
|
|||
pixel_id: int,
|
||||
predict_at: dt.datetime,
|
||||
train_horizon: int,
|
||||
) -> tuple[pd.Series, int, pd.Series]:
|
||||
) -> tuple["pd.Series[int]", int, "pd.Series[int]"]:
|
||||
"""Slice a horizontal time series out of the `.totals`.
|
||||
|
||||
Create a time series covering `train_horizon` weeks that can be used
|
||||
|
|
@ -331,7 +331,7 @@ class OrderHistory:
|
|||
pixel_id: int,
|
||||
predict_day: dt.date,
|
||||
train_horizon: int,
|
||||
) -> tuple[pd.Series, int, pd.Series]:
|
||||
) -> tuple["pd.Series[int]", int, "pd.Series[int]"]:
|
||||
"""Slice a vertical time series out of the `.totals`.
|
||||
|
||||
Create a time series covering `train_horizon` weeks that can be used
|
||||
|
|
@ -424,7 +424,7 @@ class OrderHistory:
|
|||
pixel_id: int,
|
||||
predict_at: dt.datetime,
|
||||
train_horizon: int,
|
||||
) -> tuple[pd.Series, int, pd.Series]:
|
||||
) -> tuple["pd.Series[int]", int, "pd.Series[int]"]:
|
||||
"""Slice a vertical real-time time series out of the `.totals`.
|
||||
|
||||
Create a time series covering `train_horizon` weeks that can be used
|
||||
|
|
@ -557,7 +557,7 @@ class OrderHistory:
|
|||
# `+1` as both `first_day` and `last_day` are included.
|
||||
n_days: int = (last_day - first_day).days + 1
|
||||
|
||||
return round(float(training_ts.sum()) / n_days, 1)
|
||||
return round(training_ts.sum() / n_days, 1)
|
||||
|
||||
def choose_tactical_model(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Reference in a new issue