Skip to content

Commit

Permalink
fix arguments with empty string which are declared Optional are an ob…
Browse files Browse the repository at this point in the history
…ject that is not None
  • Loading branch information
thpham committed Jan 13, 2022
1 parent dbf4664 commit 8dee3d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(',')]
Expand Down

0 comments on commit 8dee3d9

Please sign in to comment.