Mercurial > libervia-backend
diff libervia/backend/tools/common/template_xmlui.py @ 4270:0d7bb4df2343
Reformatted code base using black.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 19 Jun 2024 18:44:57 +0200 |
parents | 26b7ed2817da |
children |
line wrap: on
line diff
--- a/libervia/backend/tools/common/template_xmlui.py Tue Jun 18 12:06:45 2024 +0200 +++ b/libervia/backend/tools/common/template_xmlui.py Wed Jun 19 18:44:57 2024 +0200 @@ -26,6 +26,7 @@ from libervia.backend.core.log import getLogger from libervia.frontends.tools import xmlui from libervia.frontends.tools import jid + try: from jinja2 import Markup as safe except ImportError: @@ -158,6 +159,7 @@ class JidInputWidget(xmlui.JidInputWidget, StringWidget): type = "jid" + class TextBoxWidget(xmlui.TextWidget, InputWidget): type = "textbox" @@ -170,7 +172,8 @@ # This is normally done in the backend, the frontends should not need to # worry about it. super(XHTMLBoxWidget, self).__init__( - xmlui_parent=xmlui_parent, value=safe(value), read_only=read_only) + xmlui_parent=xmlui_parent, value=safe(value), read_only=read_only + ) class ListWidget(xmlui.ListWidget, OptionsWidget): @@ -238,6 +241,7 @@ raise NotImplementedError -create = partial(xmlui.create, class_map={ - xmlui.CLASS_PANEL: XMLUIPanel, - xmlui.CLASS_DIALOG: XMLUIDialog}) +create = partial( + xmlui.create, + class_map={xmlui.CLASS_PANEL: XMLUIPanel, xmlui.CLASS_DIALOG: XMLUIDialog}, +)