From b27dfa29544bd2ed4096b6ab4f23cb806b3c4f99 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 19:10:19 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/database.py | 4 +--- src/gsp.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/database.py b/src/database.py index 9581dfb..5f350ae 100644 --- a/src/database.py +++ b/src/database.py @@ -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( 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) @@ -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( diff --git a/src/gsp.py b/src/gsp.py index 7d19a39..dc32a5d 100644 --- a/src/gsp.py +++ b/src/gsp.py @@ -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: