MCPcopy
hub / github.com/prompt-toolkit/ptpython / append_category

Function append_category

src/ptpython/layout.py:107–114  ·  view source on GitHub ↗
(category: OptionCategory[Any])

Source from the content-addressed store, hash-verified

105 tokens: StyleAndTextTuples = []
106
107 def append_category(category: OptionCategory[Any]) -> None:
108 tokens.extend(
109 [
110 ("class:sidebar", " "),
111 ("class:sidebar.title", f" {category.title:36}"),
112 ("class:sidebar", "\n"),
113 ]
114 )
115
116 def append(index: int, label: str, status: str) -> None:
117 selected = index == python_input.selected_option_index

Callers 1

get_text_fragmentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected