diff --git a/flytekit/core/type_engine.py b/flytekit/core/type_engine.py index e7ca650c49..34444cd1b4 100644 --- a/flytekit/core/type_engine.py +++ b/flytekit/core/type_engine.py @@ -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