Skip to content

Commit

Permalink
WIP3
Browse files Browse the repository at this point in the history
  • Loading branch information
e3rd committed Sep 25, 2024
1 parent 0c94a0f commit 462858e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mininterface/cli_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ def run_tyro_parser(env_class: Type[EnvClass],

# NOTE: We put '' to the UI to clearly state that the value is missing.
# However, the UI then is not able to use the number filtering capabilities.
tag = wf[field_name] = Tag("",
tag = wf[argument.dest] = Tag("",
argument.help.replace("(required)", ""),
validation=not_empty,
_src_class=env_class,
_src_key=field_name
_src_key=argument.dest
)
# Why `type_()`? We need to put a default value so that the parsing will not fail.
# A None would be enough because Mininterface will ask for the missing values
# promply, however, Pydantic model would fail.
setattr(kwargs["default"], field_name, tag.annotation())
setattr(kwargs["default"], argument.dest, tag.annotation())

# Second attempt to parse CLI
# Why catching warnings? All the meaningful warnings
Expand Down

0 comments on commit 462858e

Please sign in to comment.