type = argument.type
if type in ['driver']: # intentionally not handled (yet)
return None
- if argument.count == -1:
- raise NotImplementedError(argument) # TODO: maybe just set count to 1?
+ count = argument.count
+ if count == -1:
+ count = 3 # HACK: should allow unlimited entries (somehow...)
+ argument._display_count = count # suport HACK in execute_command()
kwargs = {
#'label':argument.name,
'default':argument.default,
kwargs['choices'] = choices
else:
raise NotImplementedError(argument.type)
- if argument.count == 1:
+ if count == 1:
labels = [argument.name]
else:
- labels = ['%s %d' % (argument.name, i) for i in range(argument.count)]
+ labels = ['%s %d' % (argument.name, i) for i in range(count)]
return [(label, _class(label=label, **kwargs)) for label in labels]