Skip to content

Commit 0e868f4

Browse files
committed
Omit Condition for Validator
1 parent 1815229 commit 0e868f4

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

  • src/swiss_ai_model_launch/cli

src/swiss_ai_model_launch/cli/main.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,10 @@ def _make_launch_request_config(
111111
TextConfiguration(
112112
name="time",
113113
prompt="Time duration for running the model (in format HH:MM:SS).",
114-
validator=(
115-
lambda v: (
116-
bool(re.fullmatch(r"[0-9]{2}:[0-5][0-9]:[0-5][0-9]", v))
117-
if time_default_factory
118-
else None
119-
)
114+
validator=lambda v: bool(
115+
re.fullmatch(r"[0-9]{1,2}:[0-5][0-9]:[0-5][0-9]", v)
120116
),
121-
default_factory=time_default_factory,
117+
default_factory=None,
122118
),
123119
],
124120
)

0 commit comments

Comments
 (0)