INNER CODE UNIT · Python
_run_cb
jd/pifpaf · pifpaf/__main__.py:146
def _run_cb(*args, **kwargs):
return self._run(name, plugin, ctx, *args, **kwargs)
return click.Command(name=name, callback=_run_cb, params=params)
def format_commands(self, ctx, formatter):
# Same as click.MultiCommand.format_commands except it does not use
# get_command so we don't have to load commands on listing.
rows = []
for subcommand in self.list_commands(ctx):
rows.append((subcommand, 'Run ' + subcommand))
if rows:
with formatter.section('Commands'):
formatter.write_dl(rows)
def _run(self, daemon, plugin, ctx, command, **kwargs):
debug = ctx.obj['debug']