MCPcopy
hub / github.com/mitmproxy/mitmproxy / list

Method list

mitmproxy/tools/console/keymap.py:149–155  ·  view source on GitHub ↗
(self, context: str)

Source from the content-addressed store, hash-verified

147 return None
148
149 def list(self, context: str) -> Sequence[Binding]:
150 b = [x for x in self.bindings if context in x.contexts or context == "all"]
151 single = [x for x in b if len(x.key.split()) == 1]
152 multi = [x for x in b if len(x.key.split()) != 1]
153 single.sort(key=lambda x: x.sortkey())
154 multi.sort(key=lambda x: x.sortkey())
155 return single + multi
156
157 def handle(self, context: str, key: str) -> str | None:
158 """

Callers 4

test_bindFunction · 0.95
keybindingsMethod · 0.80
__init__Method · 0.80
sig_modifiedMethod · 0.80

Calls 3

sortMethod · 0.80
sortkeyMethod · 0.80
splitMethod · 0.45

Tested by 1

test_bindFunction · 0.76