feat: add choices param in preset cli options
This commit is contained in:
1 parent
9bdc1cf9d5
commit
4549e37f88
1 file changed
+7
-3
@@ -112,7 +112,7 @@ def create_argparser(setup: StdOptsSetup) -> ArgumentParser:
|
|||||||
nargs="+",
|
nargs="+",
|
||||||
type=str,
|
type=str,
|
||||||
help="Only build given name represented jobs.",
|
help="Only build given name represented jobs.",
|
||||||
metavar="RENDER",
|
metavar="JOB",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-s",
|
"-s",
|
||||||
@@ -120,9 +120,11 @@ def create_argparser(setup: StdOptsSetup) -> ArgumentParser:
|
|||||||
dest="svg_render",
|
dest="svg_render",
|
||||||
action="store",
|
action="store",
|
||||||
type=CliSvgRenderKind,
|
type=CliSvgRenderKind,
|
||||||
|
choices=list(CliSvgRenderKind),
|
||||||
default=CliSvgRenderKind.Inkscape,
|
default=CliSvgRenderKind.Inkscape,
|
||||||
help="The render used for rendering SVG into PNG.",
|
help="The render used for rendering SVG into PNG.",
|
||||||
metavar="RENDER",
|
# YYC MARK: Disable for showing choices.
|
||||||
|
# metavar="RENDER",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-f",
|
"-f",
|
||||||
@@ -131,8 +133,10 @@ def create_argparser(setup: StdOptsSetup) -> ArgumentParser:
|
|||||||
action="extend",
|
action="extend",
|
||||||
nargs="+",
|
nargs="+",
|
||||||
type=CliArtifactFormat,
|
type=CliArtifactFormat,
|
||||||
|
choices=list(CliArtifactFormat),
|
||||||
help="Only build artifacts of given formats. Repeatable. Default all formats.",
|
help="Only build artifacts of given formats. Repeatable. Default all formats.",
|
||||||
metavar="FORMAT",
|
# YYC MARK: Disable for showing choices.
|
||||||
|
# metavar="FORMAT",
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user