Writes the help into the formatter if it exists.
(self, ctx: click.Context, formatter: click.HelpFormatter)
| 106 | """Custom formatting for commands.""" |
| 107 | |
| 108 | def format_help(self, ctx: click.Context, formatter: click.HelpFormatter) -> None: |
| 109 | """Writes the help into the formatter if it exists.""" |
| 110 | if ctx.parent: |
| 111 | formatter.write(click.style(f"`{ctx.command.name}` Command", fg="cyan")) |
| 112 | formatter.write_paragraph() |
| 113 | formatter.write(click.style(LINE_SEPARATOR, fg="cyan")) |
| 114 | formatter.write_paragraph() |
| 115 | else: |
| 116 | formatter.write(click.style(LINE_SEPARATOR, fg="yellow")) |
| 117 | formatter.write_paragraph() |
| 118 | formatter.write(click.style("PySceneDetect Help", fg="yellow")) |
| 119 | formatter.write_paragraph() |
| 120 | formatter.write(click.style(LINE_SEPARATOR, fg="yellow")) |
| 121 | formatter.write_paragraph() |
| 122 | |
| 123 | self.format_usage(ctx, formatter) |
| 124 | self.format_help_text(ctx, formatter) |
| 125 | self.format_options(ctx, formatter) |
| 126 | self.format_epilog(ctx, formatter) |
| 127 | |
| 128 | def format_help_text(self, ctx: click.Context, formatter: click.HelpFormatter) -> None: |
| 129 | """Writes the help text to the formatter if it exists.""" |
nothing calls this directly
no test coverage detected