diff libervia/tui/xmlui.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents b620a8e882e1
children
line wrap: on
line diff
--- a/libervia/tui/xmlui.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/tui/xmlui.py	Wed Jun 19 18:44:57 2024 +0200
@@ -32,14 +32,14 @@
 
 
 class LiberviaTUIEvents(object):
-    """ Used to manage change event of LiberviaTUI widgets """
+    """Used to manage change event of LiberviaTUI widgets"""
 
     def _event_callback(self, ctrl, *args, **kwargs):
-        """" Call xmlui callback and ignore any extra argument """
+        """ " Call xmlui callback and ignore any extra argument"""
         args[-1](ctrl)
 
     def _xmlui_on_change(self, callback):
-        """ Call callback with widget as only argument """
+        """Call callback with widget as only argument"""
         urwid.connect_signal(self, "change", self._event_callback, callback)
 
 
@@ -266,7 +266,7 @@
         return self.get_selected_index()
 
     def _xmlui_on_select(self, callback):
-        """ Call callback with widget as only argument """
+        """Call callback with widget as only argument"""
         urwid.connect_signal(self, "click", self._event_callback, callback)
 
 
@@ -432,8 +432,9 @@
         )
         LiberviaTUIWidget.__init__(self, self.main_cont, self.xmlui_title)
 
-
-    def _parse_childs(self, _xmlui_parent, current_node, wanted=("container",), data=None):
+    def _parse_childs(
+        self, _xmlui_parent, current_node, wanted=("container",), data=None
+    ):
         # Small hack to always have a VerticalContainer as main container in LiberviaTUI.
         # this used to be the default behaviour for all frontends, but now
         # TabsContainer can also be the main container.
@@ -442,9 +443,9 @@
             if node.nodeName == "container" and node.getAttribute("type") == "tabs":
                 _xmlui_parent = self.widget_factory.createVerticalContainer(self)
                 self.main_cont = _xmlui_parent
-        return super(XMLUIPanel, self)._parse_childs(_xmlui_parent, current_node, wanted,
-                                                    data)
-
+        return super(XMLUIPanel, self)._parse_childs(
+            _xmlui_parent, current_node, wanted, data
+        )
 
     def construct_ui(self, parsed_dom):
         def post_treat():