def __init__(self, option):
if option.choices:
type_ = click.Choice(option.choices)
elif option.min is not None or option.max is not None:
type_ = click.IntRange(min=option.min, max=option.max)
else:
type_ = TYPES[option.type_name]
super().__init__(
param_decls=option.cli, help=option.help,
default=None, type=type_)
self.metadata = option.metadata
评论列表
文章目录