<#747 fix: accept enum names as valid CLI inputs i...
# flyte-github
a
#747 fix: accept enum names as valid CLI inputs in EnumParamType Pull request opened by AdilFayyaz Summary • PR #618 established the convention of using enum names (e.g. RED) instead of values throughout EnumTransformer (
get_literal_type
,
to_literal, to_python_value
), and added
examples/basics/enums.py
• PR #708 extended this to assert_type so validation also accepted names • EnumParamType in
cli/_params.py
was missed - it was still building click choices from enum values (e.g. red-value, green-value), causing
flyte run --color=GREEN
to fail immediately at argument parsing before reaching the transformer • Fix: use
e.name
for choices and
enum_type[name]
(bracket lookup by name) in convert Test command
uv run flyte run examples/basics/enums.py standalone_enum_echo --color=GREEN --size=SMALL
flyteorg/flyte-sdk