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 Apr 15, 2024
1 parent 83ee74e commit fa7e50b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/alfasim_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Top-level package for alfasim-sdk."""

import pluggy

from alfasim_sdk._internal import version
Expand Down
10 changes: 5 additions & 5 deletions src/alfasim_sdk/_internal/alfacase/case_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
)


Expand Down
24 changes: 12 additions & 12 deletions src/alfasim_sdk/result_reader/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_alfasim_sdk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit fa7e50b

Please sign in to comment.