Skip to content

Commit

Permalink
Update api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Apr 22, 2024
1 parent 2e44528 commit fe984b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/curies/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ class Config:

__root__: List[Record]

def __iter__(self) -> Iterable[Record]:
"""Iterate over records."""
return cast(Iterable[Record], iter(self.__root__))

else:
# An explanation of RootModels in Pydantic V2 can be found on
# https://docs.pydantic.dev/latest/concepts/models/#rootmodel-and-custom-root-types
Expand Down

0 comments on commit fe984b2

Please sign in to comment.