From 5af3f6e31578aa7331381b0456809d56d97fa238 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:35:49 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/national.py | 8 ++++---- src/tests/test_elexon_forecast.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/national.py b/src/national.py index 9c53956..45347d8 100644 --- a/src/national.py +++ b/src/national.py @@ -41,7 +41,9 @@ # Initialize Elexon API client api_client = ApiClient() forecast_api = GenerationForecastApi(api_client) -forecast_generation_wind_and_solar_day_ahead_get = forecast_api.forecast_generation_wind_and_solar_day_ahead_get +forecast_generation_wind_and_solar_day_ahead_get = ( + forecast_api.forecast_generation_wind_and_solar_day_ahead_get +) @router.get("/elexon", summary="Get elexon Solar Forecast") @@ -100,9 +102,7 @@ def get_elexon_forecast( logger.error("KeyError: %s. Data: %s", str(e), row) raise HTTPException(status_code=500, detail="Internal Server Error") except Exception as e: - logger.error( - "Error during DataFrame to Model conversion: %s. Data: %s", str(e), row - ) + logger.error("Error during DataFrame to Model conversion: %s. Data: %s", str(e), row) raise HTTPException(status_code=500, detail="Internal Server Error") result = SolarForecastResponse(data=forecast_values) diff --git a/src/tests/test_elexon_forecast.py b/src/tests/test_elexon_forecast.py index 96d6ba2..cf3697b 100644 --- a/src/tests/test_elexon_forecast.py +++ b/src/tests/test_elexon_forecast.py @@ -56,4 +56,3 @@ def test_get_elexon_forecast_with_data(mock_function, api_client): for i in range(len(api_data)): assert api_data[i]["expected_power_generation_megawatts"] == mock_data[i].quantity assert pd.Timestamp(api_data[i]["timestamp"]) == pd.Timestamp(mock_data[i].publish_time) -