kopia lustrzana https://github.com/bugout-dev/moonworm
Added proper CLI logic for parameters of general type
We just run a Python eval. Resolves https://github.com/moonstream-to/moonworm/issues/112pull/113/head
rodzic
1fffc52ad3
commit
0567ce0893
|
@ -831,6 +831,15 @@ def generate_cli_generator(
|
||||||
value=cst.parse_expression("eval"),
|
value=cst.parse_expression("eval"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
# In general case, we just use a Python `eval` to parse the input from the command line.
|
||||||
|
# This is similar to the way we handle `tuple` arguments.
|
||||||
|
call_args.append(
|
||||||
|
cst.Arg(
|
||||||
|
keyword=cst.Name(value="type"),
|
||||||
|
value=cst.parse_expression("eval"),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
add_argument_call = cst.Call(
|
add_argument_call = cst.Call(
|
||||||
func=cst.Attribute(
|
func=cst.Attribute(
|
||||||
|
|
Ładowanie…
Reference in New Issue