From c2d3e6b75fc102ddbe2d87211132ea7b3eb7c707 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 25 Aug 2021 12:11:26 +0200 Subject: [PATCH] args: Remove implied default=False > '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 --- nixops/args.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/nixops/args.py b/nixops/args.py index bcb073187..74b5dafea 100644 --- a/nixops/args.py +++ b/nixops/args.py @@ -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", ) @@ -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( @@ -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", ) @@ -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", ) @@ -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", )