MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / _make_row

Function _make_row

mitmproxy/tools/console/quickhelp.py:169–191  ·  view source on GitHub ↗
(label: str, items: HelpItems, keymap: Keymap)

Source from the content-addressed store, hash-verified

167
168
169def _make_row(label: str, items: HelpItems, keymap: Keymap) -> urwid.Columns:
170 cols = [
171 (len(label), urwid.Text(label)),
172 ]
173 for short, long in items.items():
174 if isinstance(long, BasicKeyHelp):
175 key_short = long.key
176 else:
177 b = keymap.binding_for_help(long)
178 if b is None:
179 continue
180 key_short = b.key_short()
181 txt = urwid.Text(
182 [
183 ("heading_inactive", key_short),
184 " ",
185 short,
186 ],
187 wrap="clip",
188 )
189 cols.append((14, txt))
190
191 return urwid.Columns(cols)

Callers 1

make_rowsMethod · 0.85

Calls 4

binding_for_helpMethod · 0.80
key_shortMethod · 0.80
itemsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…