commands: remove default=None from argparse add_argument calls

Per https://github.com/iterative/dvc/pull/2112#pullrequestreview-255013079
This commit is contained in:
Jorge Orpinel
2019-06-27 18:39:46 -05:00
parent e04e4c037c
commit 820ad50df8
6 changed files with 4 additions and 19 deletions
-1
View File
@@ -57,7 +57,6 @@ def add_parser(subparsers, parent_parser):
)
cache_dir_parser.add_argument(
"value",
default=None,
help="Path to cache directory. Relative paths are resolved relative "
"to the current directory and saved to config relative to the "
"config file location.",
+1 -3
View File
@@ -74,7 +74,5 @@ def add_parser(subparsers, parent_parser):
help="Unset option.",
)
config_parser.add_argument("name", help="Option name.")
config_parser.add_argument(
"value", nargs="?", default=None, help="Option value."
)
config_parser.add_argument("value", nargs="?", help="Option value.")
config_parser.set_defaults(func=CmdConfig)
+1 -5
View File
@@ -101,11 +101,7 @@ def shared_parent_parser():
add_help=False, parents=[get_parent_parser()]
)
shared_parent_parser.add_argument(
"-j",
"--jobs",
type=int,
default=None,
help="Number of jobs to run simultaneously.",
"-j", "--jobs", type=int, help="Number of jobs to run simultaneously."
)
shared_parent_parser.add_argument(
"--show-checksums",
-2
View File
@@ -144,7 +144,6 @@ def add_parser(subparsers, parent_parser):
diff_parser.add_argument(
"-t",
"--target",
default=None,
help=(
"Source path to a data file or directory. Default None. "
"If not specified, compares all files and directories "
@@ -161,6 +160,5 @@ def add_parser(subparsers, parent_parser):
"diff shows the difference between current HEAD and a_ref"
),
nargs="?",
default=None,
)
diff_parser.set_defaults(func=CmdDiff)
+1 -6
View File
@@ -94,11 +94,7 @@ def add_parser(subparsers, parent_parser):
help="Force garbage collection - automatically agree to all prompts.",
)
gc_parser.add_argument(
"-j",
"--jobs",
type=int,
default=None,
help="Number of jobs to run simultaneously.",
"-j", "--jobs", type=int, help="Number of jobs to run simultaneously."
)
gc_parser.add_argument(
"-p",
@@ -106,7 +102,6 @@ def add_parser(subparsers, parent_parser):
dest="repos",
type=str,
nargs="*",
default=None,
help="Keep data files required by these projects "
"in addition to the current one. "
"Useful if you share a single cache across repos.",
+1 -2
View File
@@ -130,12 +130,11 @@ def add_parser(subparsers, parent_parser):
"-f", "--file", help="Specify name of the DVC-file it generates."
)
run_parser.add_argument(
"-c", "--cwd", default=None, help="Deprecated, use -w and -f instead."
"-c", "--cwd", help="Deprecated, use -w and -f instead."
)
run_parser.add_argument(
"-w",
"--wdir",
default=None,
help="Directory within your repo to run your command in.",
)
run_parser.add_argument(