Skip to content

Commit

Permalink
try to fix an edge case
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
  • Loading branch information
wild-endeavor committed Sep 11, 2024
1 parent 10174b9 commit 7a9d420
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flytekit/core/type_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,9 @@ def assert_type(self, t: Type[T], v: T):
python_type = get_underlying_type(t)
if _is_union_type(python_type):
for sub_type in get_args(python_type):
if sub_type == typing.Any:
# this is an edge case
return
try:
super().assert_type(sub_type, v)
return
Expand Down

0 comments on commit 7a9d420

Please sign in to comment.