Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions keep/iohandler/iohandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,10 @@ def _parse(self, tree):
pass
else:
_arg = arg.id
# if the value is empty '', we still need to pass it to the function
# also, if the value is 0 or 0.0, we need to pass it to the function
# 0 == False, so we need to check if the value is not False explicitly
if (
_arg
or _arg == ""
or (_arg == 0 or _arg == 0.0)
and _arg is not False
):
# _arg is None only when no parsing branch matched (no real value produced)
# All other values — including "", 0, False, [], {}, () — are valid
# and must be passed to the function
if _arg is not None:
_args.append(_arg)

# Parse keyword args
Expand Down
Loading