Skip to content

Commit

Permalink
Type annotations and checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannis-vm committed Dec 3, 2024
1 parent d92ce6f commit 3a4ad37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pelicun/model/damage_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ def parse_scaling_specification(scaling_specification: dict) -> dict: # noqa: C
"""
# if there are contents, ensure they are valid.
# See docstring for an example of what is expected.
parsed_scaling_specification = defaultdict(dict)
parsed_scaling_specification: dict = defaultdict(dict)
# validate contents
for key, value in scaling_specification.items():
# loop through limit states
Expand Down
2 changes: 2 additions & 0 deletions pelicun/tests/basic/test_damage_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@ def test__create_dmg_RVs(self, assessment_instance: Assessment) -> None:
for rv_name, rv in capacity_rv_reg.RV.items():
uniform_sample = rv._uni_sample
sample = rv.sample
assert uniform_sample is not None
assert sample is not None
for i in range(len(operation_list)):
if rv_name == 'FRG-cmp.A-1-2-3-1-1':
theta = 1.20 * 30.0
Expand Down

0 comments on commit 3a4ad37

Please sign in to comment.