mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
completion: misc fixes (#4076)
* command: add metavars - makes help output look the same as before #3921 * deps: update shtab version Part of #4070
This commit is contained in:
@@ -66,6 +66,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"targets",
|
||||
nargs="+",
|
||||
help="Input files/directories to add.",
|
||||
metavar="targets",
|
||||
choices=completion.Required.FILE,
|
||||
)
|
||||
parser.set_defaults(func=CmdAdd)
|
||||
|
||||
@@ -56,6 +56,7 @@ def add_parser(subparsers, parent_parser):
|
||||
help="Path to cache directory. Relative paths are resolved relative "
|
||||
"to the current directory and saved to config relative to the "
|
||||
"config file location.",
|
||||
metavar="value",
|
||||
choices=completion.Required.DIR,
|
||||
)
|
||||
cache_dir_parser.set_defaults(func=CmdCacheDir)
|
||||
|
||||
@@ -114,6 +114,7 @@ def add_parser(subparsers, parent_parser):
|
||||
nargs="*",
|
||||
help="DVC-files to checkout. Optional. "
|
||||
"(Finds all DVC-files in the workspace by default.)",
|
||||
metavar="targets",
|
||||
choices=completion.Optional.DVC_FILE,
|
||||
)
|
||||
checkout_parser.set_defaults(func=CmdCheckout)
|
||||
|
||||
@@ -67,6 +67,7 @@ def add_parser(subparsers, parent_parser):
|
||||
nargs="*",
|
||||
help="DVC-files to commit. Optional. "
|
||||
"(Finds all DVC-files in the workspace by default.)",
|
||||
metavar="targets",
|
||||
choices=completion.Optional.DVC_FILE,
|
||||
)
|
||||
commit_parser.set_defaults(func=CmdCommit)
|
||||
|
||||
@@ -66,6 +66,9 @@ def add_parser(subparsers, parent_parser):
|
||||
help=DAEMON_ANALYTICS_HELP,
|
||||
)
|
||||
daemon_analytics_parser.add_argument(
|
||||
"target", help="Analytics file.", choices=completion.Required.FILE
|
||||
"target",
|
||||
help="Analytics file.",
|
||||
metavar="target",
|
||||
choices=completion.Required.FILE,
|
||||
)
|
||||
daemon_analytics_parser.set_defaults(func=CmdDaemonAnalytics)
|
||||
|
||||
@@ -105,6 +105,7 @@ def shared_parent_parser():
|
||||
nargs="*",
|
||||
help="Limit command scope to these DVC-files. "
|
||||
"Using -R, directories to search DVC-files in can also be given.",
|
||||
metavar="targets",
|
||||
choices=completion.Optional.DVC_FILE,
|
||||
)
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"targets",
|
||||
nargs="+",
|
||||
help="DVC-files to freeze.",
|
||||
metavar="targets",
|
||||
choices=completion.Required.DVC_FILE,
|
||||
)
|
||||
freeze_parser.set_defaults(func=CmdFreeze)
|
||||
@@ -59,6 +60,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"targets",
|
||||
nargs="+",
|
||||
help="DVC-files to unfreeze.",
|
||||
metavar="targets",
|
||||
choices=completion.Required.DVC_FILE,
|
||||
)
|
||||
unfreeze_parser.set_defaults(func=CmdUnfreeze)
|
||||
|
||||
@@ -65,6 +65,7 @@ def add_parser(subparsers, parent_parser):
|
||||
get_parser.add_argument(
|
||||
"path",
|
||||
help="Path to a file or directory within the repository",
|
||||
metavar="path",
|
||||
choices=completion.Required.FILE,
|
||||
)
|
||||
get_parser.add_argument(
|
||||
|
||||
@@ -37,6 +37,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"out",
|
||||
nargs="?",
|
||||
help="Destination path to put data to.",
|
||||
metavar="out",
|
||||
choices=completion.Optional.DIR,
|
||||
)
|
||||
get_parser.set_defaults(func=CmdGetUrl)
|
||||
|
||||
@@ -46,6 +46,7 @@ def add_parser(subparsers, parent_parser):
|
||||
import_parser.add_argument(
|
||||
"path",
|
||||
help="Path to a file or directory within the repository",
|
||||
metavar="path",
|
||||
choices=completion.Required.FILE,
|
||||
)
|
||||
import_parser.add_argument(
|
||||
|
||||
@@ -61,6 +61,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"out",
|
||||
nargs="?",
|
||||
help="Destination path to put files to.",
|
||||
metavar="out",
|
||||
choices=completion.Optional.DIR,
|
||||
)
|
||||
import_parser.add_argument(
|
||||
|
||||
@@ -75,6 +75,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"path",
|
||||
nargs="?",
|
||||
help="Path to directory within the repository to list outputs for",
|
||||
metavar="path",
|
||||
choices=completion.Optional.DIR,
|
||||
)
|
||||
list_parser.set_defaults(func=CmdList)
|
||||
|
||||
@@ -170,6 +170,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"Limit command scope to these metric files. Using -R, "
|
||||
"directories to search metric files in can also be given."
|
||||
),
|
||||
metavar="targets",
|
||||
choices=completion.Optional.FILE,
|
||||
)
|
||||
metrics_show_parser.add_argument(
|
||||
|
||||
+5
-1
@@ -39,9 +39,13 @@ def add_parser(subparsers, parent_parser):
|
||||
move_parser.add_argument(
|
||||
"src",
|
||||
help="Source path to a data file or directory.",
|
||||
metavar="src",
|
||||
choices=completion.Required.FILE,
|
||||
)
|
||||
move_parser.add_argument(
|
||||
"dst", help="Destination path.", choices=completion.Required.FILE,
|
||||
"dst",
|
||||
help="Destination path.",
|
||||
metavar="dst",
|
||||
choices=completion.Required.FILE,
|
||||
)
|
||||
move_parser.set_defaults(func=CmdMove)
|
||||
|
||||
@@ -129,6 +129,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"targets",
|
||||
nargs="*",
|
||||
help="Plots files to visualize. Shows all plots by default.",
|
||||
metavar="targets",
|
||||
choices=completion.Optional.FILE,
|
||||
)
|
||||
_add_props_arguments(plots_show_parser)
|
||||
@@ -171,6 +172,7 @@ def add_parser(subparsers, parent_parser):
|
||||
plots_modify_parser.add_argument(
|
||||
"target",
|
||||
help="Metric file to set properties to",
|
||||
metavar="target",
|
||||
choices=completion.Required.FILE,
|
||||
)
|
||||
_add_props_arguments(plots_modify_parser)
|
||||
|
||||
@@ -38,6 +38,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"targets",
|
||||
nargs="+",
|
||||
help="DVC-files to remove.",
|
||||
metavar="targets",
|
||||
choices=completion.Required.DVC_FILE,
|
||||
)
|
||||
remove_parser.set_defaults(func=CmdRemove)
|
||||
|
||||
@@ -72,6 +72,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"targets",
|
||||
nargs="*",
|
||||
help=f"Stages to reproduce. '{PIPELINE_FILE}' by default.",
|
||||
metavar="targets",
|
||||
choices=completion.Optional.DVC_FILE,
|
||||
)
|
||||
repro_parser.add_argument(
|
||||
|
||||
@@ -36,6 +36,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"targets",
|
||||
nargs="+",
|
||||
help="Data files/directories to unprotect.",
|
||||
metavar="targets",
|
||||
choices=completion.Required.FILE,
|
||||
)
|
||||
unprotect_parser.set_defaults(func=CmdUnprotect)
|
||||
|
||||
@@ -36,6 +36,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"targets",
|
||||
nargs="+",
|
||||
help="DVC-files to update.",
|
||||
metavar="targets",
|
||||
choices=completion.Required.DVC_FILE,
|
||||
)
|
||||
update_parser.add_argument(
|
||||
|
||||
Reference in New Issue
Block a user