Skip to content

Commit

Permalink
📝 add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mwulfman committed Jun 27, 2024
1 parent ee3ebec commit e16355a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/jiminy_py/src/jiminy_py/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ def _unflatten_as(data: StructNested[Any],
flat_items = [(key, _unflatten_as(value, data_leaf_it))
for key, value in data.items()] # type: ignore[union-attr]
try:
# Initialisation from dict cannot be the default path as `gym.spaces.Dict`

Check notice on line 179 in python/jiminy_py/src/jiminy_py/tree.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/jiminy_py/src/jiminy_py/tree.py#L179

Line too long (86/80)
# would sort keys in this specific scenario, which must be avoided.
return data_type(flat_items) # type: ignore[call-arg]
except (ValueError, RuntimeError):
# Fallback to initialisation from dict in the rare event of
Expand Down

0 comments on commit e16355a

Please sign in to comment.