Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove _get_cls_to_instantiate.
  • Loading branch information
anntzer committed Jan 4, 2018
commit a1e88f4094403e4f08346e40e2b7161e5a8be00e
17 changes: 0 additions & 17 deletions lib/matplotlib/backend_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,23 +325,6 @@ def _handle_toggle(self, tool, canvasevent):
# Keep track of the toggled tool in the radio_group
self._toggled[radio_group] = toggled

def _get_cls_to_instantiate(self, callback_class):
# Find the class that corresponds to the tool
if isinstance(callback_class, six.string_types):
# FIXME: make more complete searching structure
if callback_class in globals():
callback_class = globals()[callback_class]
else:
mod = 'backend_tools'
current_module = __import__(mod,
globals(), locals(), [mod], 1)

callback_class = getattr(current_module, callback_class, False)
if callable(callback_class):
return callback_class
else:
return None

def trigger_tool(self, name, canvasevent=None):
"""
Trigger a tool and emit the tool_trigger_[name] event
Expand Down