MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / update_keymap

Method update_keymap

site-packages/matplotlib/backend_managers.py:186–207  ·  view source on GitHub ↗

Set the keymap to associate with the specified tool Parameters ---------- name : string Name of the Tool keys : keys to associate with the Tool

(self, name, *keys)

Source from the content-addressed store, hash-verified

184 del self._keys[k]
185
186 def update_keymap(self, name, *keys):
187 """
188 Set the keymap to associate with the specified tool
189
190 Parameters
191 ----------
192 name : string
193 Name of the Tool
194 keys : keys to associate with the Tool
195 """
196
197 if name not in self._tools:
198 raise KeyError('%s not in Tools' % name)
199
200 self._remove_keys(name)
201
202 for key in keys:
203 for k in validate_stringlist(key):
204 if k in self._keys:
205 warnings.warn('Key %s changed from %s to %s' %
206 (k, self._keys[k], name))
207 self._keys[k] = name
208
209 def remove_tool(self, name):
210 """

Callers 1

add_toolMethod · 0.95

Calls 2

_remove_keysMethod · 0.95
warnMethod · 0.45

Tested by

no test coverage detected