(self, ctx: click.Context, name: str)
| 503 | self._loaded_plugin_commands = True |
| 504 | |
| 505 | def get_command(self, ctx: click.Context, name: str) -> click.Command: |
| 506 | self._load_plugin_commands() |
| 507 | |
| 508 | rv = super().get_command(ctx, name) |
| 509 | |
| 510 | if rv is not None: |
| 511 | return rv |
| 512 | |
| 513 | info = ctx.ensure_object(ScriptInfo) |
| 514 | |
| 515 | # Look up commands provided by the app, showing an error and |
| 516 | # continuing if the app couldn't be loaded. |
| 517 | try: |
| 518 | app = info.load_app() |
| 519 | except NoAppException as e: |
| 520 | click.secho(f"Error: {e.format_message()}\n", err=True, fg="red") |
| 521 | return None |
| 522 | |
| 523 | return app.cli.get_command(ctx, name) |
| 524 | |
| 525 | def list_commands(self, ctx: click.Context) -> list[str]: |
| 526 | self._load_plugin_commands() |
nothing calls this directly
no test coverage detected