Skip to content

Commit

Permalink
args: Remove implied default=False
Browse files Browse the repository at this point in the history
> 'store_true' and 'store_false' - These are special cases of
> 'store_const' used for storing the values True and False
> respectively. In addition, they create default values of
> False and True respectively.

https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_argument
  • Loading branch information
roberth committed Aug 25, 2021
1 parent b46faeb commit c2d3e6b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions nixops/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@
subparser.add_argument(
"--now",
dest="now",
default=False,
action="store_true",
help="do not acquire a lock before fetching the state",
)
Expand Down Expand Up @@ -450,14 +449,12 @@
"--freeze",
dest="freeze_fs",
action="store_true",
default=False,
help="freeze filesystems for non-root filesystems that support this (e.g. xfs)",
)
subparser.add_argument(
"--force",
dest="force",
action="store_true",
default=False,
help="start new backup even if previous is still running",
)
subparser.add_argument(
Expand Down Expand Up @@ -485,17 +482,12 @@
help="do not perform backup actions on the specified machines",
)
subparser.add_argument(
"--wait",
dest="wait",
action="store_true",
default=False,
help="wait until backup is finished",
"--wait", dest="wait", action="store_true", help="wait until backup is finished",
)
subparser.add_argument(
"--latest",
dest="latest",
action="store_true",
default=False,
help="show status of latest backup only",
)

Expand All @@ -505,7 +497,6 @@
subparser.add_argument(
"--keep-physical",
dest="keep_physical",
default=False,
action="store_true",
help="do not remove the physical backups, only remove backups from nixops state",
)
Expand All @@ -525,7 +516,6 @@
subparser.add_argument(
"--keep-physical",
dest="keep_physical",
default=False,
action="store_true",
help="do not remove the physical backups, only remove backups from nixops state",
)
Expand Down

0 comments on commit c2d3e6b

Please sign in to comment.