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

Class OptionHelp

mitmproxy/tools/console/options.py:220–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218
219
220class OptionHelp(urwid.Frame):
221 def __init__(self, master):
222 self.master = master
223 super().__init__(self.widget(""))
224 self.set_active(False)
225
226 def set_active(self, val):
227 h = urwid.Text("Option Help")
228 style = "heading" if val else "heading_inactive"
229 self.header = urwid.AttrMap(h, style)
230
231 def widget(self, txt):
232 cols, _ = self.master.ui.get_cols_rows()
233 return urwid.ListBox([urwid.Text(i) for i in textwrap.wrap(txt, cols)])
234
235 def update_help_text(self, txt: str) -> None:
236 self.body = self.widget(txt)
237
238
239class Options(urwid.Pile, layoutwidget.LayoutWidget):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…