def _format_options(ctx):
"""Format all `click.Option` for a `click.Command`."""
# the hidden attribute is part of click 7.x only hence use of getattr
params = [x for x in ctx.command.params if isinstance(x, click.Option)
and not getattr(x, 'hidden', False)]
for param in params:
for line in _format_option(param):
yield line
yield ''
评论列表
文章目录