Skip to content

Commit

Permalink
check key in annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed Feb 11, 2024
1 parent c96ec93 commit a1a5846
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neo/core/baseneo.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def _check_annotations(value):
if not issubclass(value.dtype.type, ALLOWED_ANNOTATION_TYPES):
raise ValueError(f"Invalid annotation. NumPy arrays with dtype {value.dtype.type}" f"are not allowed")
elif isinstance(value, dict):
for element in value.values():
for key, element in value.items():
_check_annotations(key)
_check_annotations(element)
elif isinstance(value, (list, tuple)):
for element in value:
Expand Down

0 comments on commit a1a5846

Please sign in to comment.