From 140e5365057e68e39bf6736f6e24881fa9f5b853 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:44:54 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/alfasim_sdk/__init__.py | 1 + .../_internal/alfacase/case_description.py | 10 ++++---- src/alfasim_sdk/result_reader/aggregator.py | 24 +++++++++---------- tests/test_alfasim_sdk_utils.py | 3 +-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/alfasim_sdk/__init__.py b/src/alfasim_sdk/__init__.py index 54d5249d..c7d8c922 100644 --- a/src/alfasim_sdk/__init__.py +++ b/src/alfasim_sdk/__init__.py @@ -1,4 +1,5 @@ """Top-level package for alfasim-sdk.""" + import pluggy from alfasim_sdk._internal import version diff --git a/src/alfasim_sdk/_internal/alfacase/case_description.py b/src/alfasim_sdk/_internal/alfacase/case_description.py index 8fbaa204..402b900b 100644 --- a/src/alfasim_sdk/_internal/alfacase/case_description.py +++ b/src/alfasim_sdk/_internal/alfacase/case_description.py @@ -3294,11 +3294,11 @@ class TracersDescription: .. include:: /alfacase_definitions/TracersDescription.txt """ - constant_coefficients: Dict[ - str, TracerModelConstantCoefficientsDescription - ] = attr.ib( - default=attr.Factory(dict), - validator=dict_of(TracerModelConstantCoefficientsDescription), + constant_coefficients: Dict[str, TracerModelConstantCoefficientsDescription] = ( + attr.ib( + default=attr.Factory(dict), + validator=dict_of(TracerModelConstantCoefficientsDescription), + ) ) diff --git a/src/alfasim_sdk/result_reader/aggregator.py b/src/alfasim_sdk/result_reader/aggregator.py index 318eb53e..e28300a6 100644 --- a/src/alfasim_sdk/result_reader/aggregator.py +++ b/src/alfasim_sdk/result_reader/aggregator.py @@ -1417,21 +1417,21 @@ def _read_time_sets( _TREND_ID_ATTR: [initial_trends_time_step_index, final_trends_time_step_index], } if initial_profiles_time_step_index is None: - time_step_index_range_to_read[_PROFILE_ID_ATTR][ - 0 - ] = result_metadata.time_steps_boundaries[0][0] + time_step_index_range_to_read[_PROFILE_ID_ATTR][0] = ( + result_metadata.time_steps_boundaries[0][0] + ) if final_profiles_time_step_index is None: - time_step_index_range_to_read[_PROFILE_ID_ATTR][ - 1 - ] = result_metadata.time_steps_boundaries[1][0] + time_step_index_range_to_read[_PROFILE_ID_ATTR][1] = ( + result_metadata.time_steps_boundaries[1][0] + ) if initial_trends_time_step_index is None: - time_step_index_range_to_read[_TREND_ID_ATTR][ - 0 - ] = result_metadata.time_steps_boundaries[0][1] + time_step_index_range_to_read[_TREND_ID_ATTR][0] = ( + result_metadata.time_steps_boundaries[0][1] + ) if final_trends_time_step_index is None: - time_step_index_range_to_read[_TREND_ID_ATTR][ - 1 - ] = result_metadata.time_steps_boundaries[1][1] + time_step_index_range_to_read[_TREND_ID_ATTR][1] = ( + result_metadata.time_steps_boundaries[1][1] + ) cache = {} for time_set_key in time_sets_key_list: diff --git a/tests/test_alfasim_sdk_utils.py b/tests/test_alfasim_sdk_utils.py index b871b115..ba273b09 100644 --- a/tests/test_alfasim_sdk_utils.py +++ b/tests/test_alfasim_sdk_utils.py @@ -26,8 +26,7 @@ def test_get_metadata() -> None: from alfasim_sdk._internal.alfasim_sdk_utils import get_metadata @data_model(icon="model.png", caption="PLUGIN DEV MODEL") - class Model: - ... + class Model: ... assert get_metadata(Model)["caption"] == "PLUGIN DEV MODEL" assert get_metadata(Model)["icon"] == "model.png"