[docs]classArgument(click.Argument):"""A :class:`click.Argument` with help text."""def__init__(self,*args,help=None,**attrs):super().__init__(*args,**attrs)self.help=help
[docs]classOption(click.Option):"""A :class:`click.Option` with an extra field ``group`` of type ``OptionGroup``."""def__init__(self,*args,group=None,**attrs):super().__init__(*args,**attrs)self.group=group
[docs]defoption(*param_decls,cls=None,group=None,**attrs):"""Attach an ``Option`` to the command. Refer to :class:`click.Option` and :class:`click.Parameter` for more info about the accepted parameters. In your IDE, you won't see arguments relating to shell completion, because they are different in Click 7 and 8 (both supported by Cloup): - in Click 7, it's ``autocompletion`` - in Click 8, it's ``shell_complete``. These arguments have different semantics, refer to Click's docs. """OptionClass=clsorOptiondefdecorator(f):_param_memo(f,OptionClass(param_decls,**attrs))new_option=f.__click_params__[-1]new_option.group=groupifgroupandgroup.hidden:new_option.hidden=Truereturnfreturndecorator