MCPcopy Index your code
hub / github.com/rawpython/remi / load_additional_widgets

Method load_additional_widgets

editor/editor_widgets.py:652–666  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

650 #self.load_additional_widgets()
651
652 def load_additional_widgets(self):
653 try:
654 import widgets
655 except Exception:
656 from . import widgets
657 try:
658 classes = inspect.getmembers(widgets, inspect.isclass)
659 for (classname, classvalue) in classes:
660 if issubclass(classvalue, gui.Widget):
661 self.add_widget_to_collection(
662 classvalue, classvalue.__module__)
663
664 except Exception:
665 logging.getLogger('remi.editor').error(
666 'error loading external widgets', exc_info=True)
667
668 def add_widget_to_collection(self, widgetClass, group='standard_tools', **kwargs_to_widget):
669 # create an helper that will be created on click

Callers 1

onloadMethod · 0.80

Calls 1

Tested by

no test coverage detected