Skip to content

Commit

Permalink
fix for is_basemodel_subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
hatchet-temporary committed Dec 17, 2024
1 parent e87b24f commit f033e9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hatchet_sdk/utils/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@


def is_basemodel_subclass(model: Any) -> bool:
return isinstance(model, type) and issubclass(model, BaseModel)
try:
return issubclass(model, BaseModel)
except TypeError:
return False

0 comments on commit f033e9f

Please sign in to comment.