Skip to content

Commit

Permalink
Add None as ArgType
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiefl committed Dec 31, 2024
1 parent c48dd43 commit 407509b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pooltool/physics/resolve/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pooltool.serialize import conversion
from pooltool.serialize.serializers import SerializeFormat

ArgType = Union[float, int, str, bool]
ArgType = Union[float, int, str, bool, None]
"""Allowable types model arguments"""

# Recursive type definition is not fixed with PEP 563, so ForwardRef type is required.
Expand Down
1 change: 1 addition & 0 deletions tests/physics/resolve/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def test_model_args_flat(tmp_path):
"a": 42,
"b": True,
"c": "string",
"d": None,
}
conversion.unstructure_to(d, tmp_path / "test.yaml")
assert d == conversion.structure_from(tmp_path / "test.yaml", ModelArgs)
Expand Down

0 comments on commit 407509b

Please sign in to comment.