Skip to content

Commit

Permalink
commands: remove default=None from argparse add_argument calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeorpinel committed Jun 27, 2019
1 parent e04e4c0 commit 820ad50
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 19 deletions.
1 change: 0 additions & 1 deletion dvc/command/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
4 changes: 1 addition & 3 deletions dvc/command/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 1 addition & 5 deletions dvc/command/data_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions dvc/command/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand All @@ -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)
7 changes: 1 addition & 6 deletions dvc/command/gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,14 @@ 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",
"--projects",
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.",
Expand Down
3 changes: 1 addition & 2 deletions dvc/command/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 820ad50

Please sign in to comment.