Skip to content

Commit

Permalink
Validate input name is lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
ddl-rliu committed Aug 6, 2024
1 parent 9321bc2 commit db4a100
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flytekit/core/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ def __init__(
if inputs:
for k, v in inputs.items():
if not k.isidentifier():
raise ValueError(f"Input name must be valid Python identifier: {k!r}")
raise ValueError(f"Input name must be a valid Python identifier: {k!r}")
if k != k.lower():
# Click does not support uppercase option names: https://github.com/pallets/click/issues/837
raise ValueError(f"Input name must be lowercase: {k!r}")
if type(v) is tuple and len(cast(Tuple, v)) > 1:
self._inputs[k] = v # type: ignore
else:
Expand Down

0 comments on commit db4a100

Please sign in to comment.