add storefalse properties for boolean option

This commit is contained in:
2019-04-03 07:51:26 +02:00
parent 266cef224e
commit eeca074331
2 changed files with 28 additions and 6 deletions

View File

@ -221,12 +221,12 @@ class TiramisuCmdlineParser(ArgumentParser):
if _forhelp and 'mandatory' in properties:
kwargs['required'] = True
if option.type() == 'boolean':
if obj.value.get() is False:
action = 'store_true'
no_action = 'store_false'
else:
if 'storefalse' in properties:
action = 'store_false'
no_action = 'store_true'
else:
action = 'store_true'
no_action = 'store_false'
kwargs['action'] = action
args = [self._gen_argument(name, 'longargument' in properties)]
#