From 090e9a3cd539579613f29650633f99c24b8794d4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:47: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 129eb6f9..6492c17e 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 f0d93f86..9590cc49 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 b26cef31..6ff6f157 100644 --- a/src/alfasim_sdk/result_reader/aggregator.py +++ b/src/alfasim_sdk/result_reader/aggregator.py @@ -1406,21 +1406,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 4eb7eb2c..8d397931 100644 --- a/tests/test_alfasim_sdk_utils.py +++ b/tests/test_alfasim_sdk_utils.py @@ -28,8 +28,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"