From 60499483afd43585279066389357dfe7cfb544e5 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:15:29 -0700 Subject: [PATCH] Fixes boundary conditions for literal convertor (#2596) * Fixes boundary conditions for literal convertor Signed-off-by: Ketan Umare * Better fix Signed-off-by: Ketan Umare --------- Signed-off-by: Ketan Umare Signed-off-by: Eduardo Apolinario Co-authored-by: Ketan Umare Co-authored-by: Eduardo Apolinario --- flytekit/core/type_engine.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flytekit/core/type_engine.py b/flytekit/core/type_engine.py index 94e824a30b..70344b6a86 100644 --- a/flytekit/core/type_engine.py +++ b/flytekit/core/type_engine.py @@ -1393,6 +1393,9 @@ async def _literal_map_to_kwargs( else: python_interface_inputs = python_types # type: ignore + if not python_interface_inputs or len(python_interface_inputs) == 0: + return {} + if len(lm.literals) > len(python_interface_inputs): raise ValueError( f"Received more input values {len(lm.literals)}"