Import datetime as dt everywhere

This commit is contained in:
Alexander Hess 2026-11-30 15:50:17 +01:00
commit 5ca16ae47c
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -4,7 +4,7 @@ Unless otherwise noted, each `time_step` is 60 minutes long implying
12 time steps per day (i.e., we use `LONG_TIME_STEP` by default).
"""
import datetime
import datetime as dt
import pandas as pd
import pytest
@ -20,7 +20,7 @@ def good_predict_at():
... a long enough history so that either `SHORT_TRAIN_HORIZON`
or `LONG_TRAIN_HORIZON` works.
"""
return datetime.datetime(
return dt.datetime(
test_config.END.year,
test_config.END.month,
test_config.END.day,
@ -36,8 +36,8 @@ def bad_predict_at():
... not a long enough history so that both `SHORT_TRAIN_HORIZON`
and `LONG_TRAIN_HORIZON` do not work.
"""
predict_day = test_config.END - datetime.timedelta(weeks=6, days=1)
return datetime.datetime(
predict_day = test_config.END - dt.timedelta(weeks=6, days=1)
return dt.datetime(
predict_day.year,
predict_day.month,
predict_day.day,
@ -341,7 +341,7 @@ class TestMakeRealTimeTimeSeries:
The time series with the actual order counts always holds `1` value.
"""
predict_at = datetime.datetime(
predict_at = dt.datetime(
good_predict_at.year,
good_predict_at.month,
good_predict_at.day,