Skip to content
Merged
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
5 changes: 4 additions & 1 deletion knack/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ def update_argument(self, param_name, argtype):
# that coincides with the default
if isinstance(arg_default, str):
arg_default = DefaultStr(arg_default)
elif isinstance(arg_default, int):
elif isinstance(arg_default, int) and not isinstance(arg_default, bool):
# bool's is_default is ignored for now, because
# 1. bool is a subclass of int, so isinstance(True, int) cannot distinguish between int and bool
# 2. bool is not extendable according to https://stackoverflow.com/a/2172204/2199657
arg_default = DefaultInt(arg_default)
# update the default
if arg_default:
Expand Down