MCPcopy
hub / github.com/mitmproxy/mitmproxy / unbind

Method unbind

mitmproxy/tools/console/keymap.py:128–135  ·  view source on GitHub ↗

Unbind also removes the binding from the list.

(self, binding: Binding)

Source from the content-addressed store, hash-verified

126 self.keys[c][binding.keyspec()] = binding
127
128 def unbind(self, binding: Binding) -> None:
129 """
130 Unbind also removes the binding from the list.
131 """
132 for c in binding.contexts:
133 del self.keys[c][binding.keyspec()]
134 self.bindings = [b for b in self.bindings if b != binding]
135 self._on_change()
136
137 def get(self, context: str, key: str) -> Binding | None:
138 if context in self.keys:

Callers 3

test_make_rowsFunction · 0.95
test_joinFunction · 0.95
removeMethod · 0.95

Calls 2

_on_changeMethod · 0.95
keyspecMethod · 0.80

Tested by 2

test_make_rowsFunction · 0.76
test_joinFunction · 0.76