Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
havogt committed Dec 3, 2024
1 parent f220b34 commit 7fb18ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gt4py/next/iterator/type_system/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ def _get_dimensions(obj: Any):
if isinstance(obj, common.Dimension):
yield obj
elif isinstance(obj, ts.TypeSpec):
for field in obj.__datamodel_fields__.values():
yield from _get_dimensions(getattr(obj, field.name))
for field in obj.__datamodel_fields__.keys():
yield from _get_dimensions(getattr(obj, field))
elif isinstance(obj, collections.abc.Mapping):
for el in obj.values():
yield from _get_dimensions(el)
Expand Down

0 comments on commit 7fb18ae

Please sign in to comment.