From 8dee3d98018dbfdc26bf2f54c0dda3a235b9356f Mon Sep 17 00:00:00 2001 From: "Pham, Thomas" Date: Thu, 13 Jan 2022 18:07:41 +0100 Subject: [PATCH] fix arguments with empty string which are declared Optional are an object that is not None --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index cab8ac1..ed89ecb 100644 --- a/main.py +++ b/main.py @@ -244,19 +244,19 @@ def validate_inputs( else: untagged_only_ = untagged_only - if skip_tags is None: + if not skip_tags: skip_tags_ = [] else: skip_tags_ = [i.strip() for i in skip_tags.split(',')] - if keep_at_least is None: + if not keep_at_least: keep_at_least_ = 0 else: keep_at_least_ = int(keep_at_least) if keep_at_least_ < 0: raise ValueError('keep-at-least must be 0 or positive') - if filter_tags is None: + if not filter_tags: filter_tags_ = [] else: filter_tags_ = [i.strip() for i in filter_tags.split(',')]