From f033e9ff4fac6ae2264893fa782e3411ba7187cb Mon Sep 17 00:00:00 2001 From: hatchet-temporary Date: Tue, 17 Dec 2024 17:57:12 -0500 Subject: [PATCH] fix for is_basemodel_subclass --- hatchet_sdk/utils/typing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hatchet_sdk/utils/typing.py b/hatchet_sdk/utils/typing.py index 4a6d968a..db111db5 100644 --- a/hatchet_sdk/utils/typing.py +++ b/hatchet_sdk/utils/typing.py @@ -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