Skip to content

Commit bdce4e7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 20c2003 commit bdce4e7

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

nowcasting_datamodel/read/read.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from sqlalchemy.orm.session import Session
1414
from sqlalchemy.sql.expression import false, true
1515

16+
from nowcasting_datamodel import N_GSP
1617
from nowcasting_datamodel.models import (
1718
ForecastSQL,
1819
ForecastValueLatestSQL,
@@ -23,9 +24,7 @@
2324
PVSystemSQL,
2425
StatusSQL,
2526
national_gb_label,
26-
2727
)
28-
from nowcasting_datamodel import N_GSP
2928

3029
logger = logging.getLogger(__name__)
3130

@@ -146,10 +145,7 @@ def get_latest_forecast(
146145
gsp_ids = None
147146

148147
forecasts = get_latest_forecast_for_gsps(
149-
session=session,
150-
start_target_time=start_target_time,
151-
historic=historic,
152-
gsp_ids=gsp_ids
148+
session=session, start_target_time=start_target_time, historic=historic, gsp_ids=gsp_ids
153149
)
154150

155151
if forecasts is None:
@@ -202,7 +198,7 @@ def get_all_gsp_ids_latest_forecast(
202198
start_target_time=start_target_time,
203199
preload_children=preload_children,
204200
historic=historic,
205-
gsp_ids=list(range(0,N_GSP+1))
201+
gsp_ids=list(range(0, N_GSP + 1)),
206202
)
207203

208204

tests/read/test_read.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from nowcasting_datamodel.models import (
1414
Forecast,
1515
ForecastValue,
16-
ForecastValueSQL,
1716
ForecastValueLatestSQL,
17+
ForecastValueSQL,
1818
InputDataLastUpdatedSQL,
1919
LocationSQL,
2020
MLModel,

0 commit comments

Comments
 (0)