Skip to content

Commit f237fcb

Browse files
Correct syntax error
1 parent 943f98b commit f237fcb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/datapoint/Forecast.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ def _build_timesteps_from_daily(self, forecasts, parameters):
179179
# onwards. Using this if statement to remember to remove the
180180
# explicit strptime in the future, and it annoyed me that
181181
# fromisoformat couldn't handle all iso-formatted datetimes.
182-
night_step = datetime.datetime.strptime(
183-
forecast["time"], "%Y-%m-%dT%H:%M%z"
184-
)
182+
night_step = {
183+
"time": datetime.datetime.strptime(
184+
forecast["time"], "%Y-%m-%dT%H:%M%z"
185+
)
186+
}
185187
day_step = {
186188
"time": datetime.datetime.strptime(
187189
forecast["time"], "%Y-%m-%dT%H:%M%z"

0 commit comments

Comments
 (0)