MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / _create_help_grid

Method _create_help_grid

cmd2/cmd2.py:4358–4365  ·  view source on GitHub ↗

Create a titled grid for help headers with a ruler and optional content.

(self, title: str, *content: RenderableType)

Source from the content-addressed store, hash-verified

4356 self.last_result = False
4357
4358 def _create_help_grid(self, title: str, *content: RenderableType) -> Table:
4359 """Create a titled grid for help headers with a ruler and optional content."""
4360 grid = Table.grid()
4361 grid.add_row(Text(title, style=Cmd2Style.HELP_HEADER))
4362 grid.add_row(Rule(style=Cmd2Style.TABLE_BORDER))
4363 for item in content:
4364 grid.add_row(item)
4365 return grid
4366
4367 def print_topics(self, header: str, cmds: Sequence[str] | None, cmdlen: int, maxcol: int) -> None: # noqa: ARG002
4368 """Print groups of commands and topics in columns and an optional header.

Callers 2

print_topicsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected