From 62914fa85ada8cf47fac3099f555a8ae7f75b3d6 Mon Sep 17 00:00:00 2001 From: Robert Clark Date: Thu, 4 Mar 2021 10:33:36 -0600 Subject: [PATCH] Make size flag a boolean The --size flag was being treated as a generic object which required any value to be passed to be considered True. This meant users had to specify `--size 1` or similar in order to get the flag to work. Forcing the value to be True when passed and False otherwise is the original intended behavior. Signed-Off-By: Robert Clark --- imagine/imagine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imagine/imagine.py b/imagine/imagine.py index 13917e2..53fc35c 100755 --- a/imagine/imagine.py +++ b/imagine/imagine.py @@ -101,7 +101,8 @@ def _parse_args() -> Namespace: standard.add_argument('--seed', help='The seed to use while generating ' 'random image data', type=int, default=0) standard.add_argument('--size', help='Display the first image size and ' - 'the directory size for the images') + 'the directory size for the images', + action='store_true') return parser.parse_args()