1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-05-03 05:14:25 +02:00

feat: add loader/helper for widget plugins

This commit is contained in:
2025-03-13 10:31:25 +01:00
parent b4925918f7
commit ca2bb4f9b4
19 changed files with 512 additions and 3671 deletions
+3 -5
View File
@@ -1,9 +1,9 @@
from __future__ import annotations
from typing import Any
from bec_widgets.cli.client_utils import IGNORE_WIDGETS
from bec_widgets.utils.bec_plugin_helper import get_all_plugin_widgets
from bec_widgets.utils.bec_widget import BECWidget
from bec_widgets.utils.plugin_utils import get_custom_classes
class RPCWidgetHandler:
@@ -31,10 +31,8 @@ class RPCWidgetHandler:
Returns:
None
"""
from bec_widgets.utils.plugin_utils import get_custom_classes
clss = get_custom_classes("bec_widgets")
self._widget_classes = {
self._widget_classes = get_all_plugin_widgets() | {
cls.__name__: cls for cls in clss.widgets if cls.__name__ not in IGNORE_WIDGETS
}