Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 13, 2024
1 parent d34d218 commit b27dfa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@ def get_forecasts_from_database(
# get the latest forecast for all gsps.

if historic:

if creation_utc_limit is not None:
raise HTTPException(

Check warning on line 115 in src/database.py

View check run for this annotation

Codecov / codecov/patch

src/database.py#L115

Added line #L115 was not covered by tests
status_code=400,
detail="creation_utc_limit is not supported for historic=True forecasts. "
"These forecast are continuously updated, compare to a forecast made a particular time."
"These forecast are continuously updated, compare to a forecast made a particular time.",
)

start_datetime = get_start_datetime(start_datetime=start_datetime_utc)
Expand All @@ -135,7 +134,6 @@ def get_forecasts_from_database(
logger.debug(f"Found {len(forecasts)} forecasts from database")

else:

# To speed up read time we only look at the last 12 hours of results, and take floor 30 mins
if start_datetime_utc is None:
start_datetime_utc = floor_30_minutes_dt(
Expand Down
2 changes: 1 addition & 1 deletion src/gsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_all_available_forecasts(
end_datetime_utc=end_datetime_utc,
compact=compact,
gsp_ids=gsp_ids,
creation_utc_limit=creation_limit_utc
creation_utc_limit=creation_limit_utc,
)

if not compact:
Expand Down

0 comments on commit b27dfa2

Please sign in to comment.