From b0bf9e0ed1cd0dfacb442a63e1e2f5eace190d27 Mon Sep 17 00:00:00 2001 From: z3z1ma Date: Thu, 28 Mar 2024 16:11:04 -0500 Subject: [PATCH] fix: check for typeddict before class or subclass checks which fail --- dlt/common/typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlt/common/typing.py b/dlt/common/typing.py index 05720fe7d9..99c2604cdf 100644 --- a/dlt/common/typing.py +++ b/dlt/common/typing.py @@ -243,7 +243,7 @@ def get_all_types_of_class_in_union(hint: Type[Any], cls: Type[TAny]) -> List[Ty return [ t for t in get_args(hint) - if inspect.isclass(t) and (issubclass(t, cls) or issubclass(cls, t)) + if not is_typeddict(t) and inspect.isclass(t) and (issubclass(t, cls) or issubclass(cls, t)) ]