diff libervia/backend/plugins/plugin_xep_0055.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 4b842c1fb686
children
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0055.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/plugins/plugin_xep_0055.py	Wed Jun 19 18:44:57 2024 +0200
@@ -61,8 +61,8 @@
 
 FIELD_SINGLE = "field_single"  # single text field for the simple search
 FIELD_CURRENT_SERVICE = (
-    "current_service_jid"
-)  # read-only text field for the advanced search
+    "current_service_jid"  # read-only text field for the advanced search
+)
 
 
 class XEP_0055(object):
@@ -124,7 +124,9 @@
         """
         # check if the user's server offers some search services
         d = self._get_host_services(profile)
-        return d.addCallback(lambda services: self.get_main_ui(services, raw_data, profile))
+        return d.addCallback(
+            lambda services: self.get_main_ui(services, raw_data, profile)
+        )
 
     def get_main_ui(self, services, raw_data, profile):
         """Get the XMLUI for selecting a service and searching the directory.
@@ -198,7 +200,9 @@
         if simple_data:
             log.debug("Simple search with %s on %s" % (simple_data, service_jid))
             sub_cont.parent.set_selected(True)
-            main_ui.change_container(sub_cont.append(xml_tools.VerticalContainer(main_ui)))
+            main_ui.change_container(
+                sub_cont.append(xml_tools.VerticalContainer(main_ui))
+            )
             main_ui.addDivider("dash")
             d = self.search_request(service_jid, simple_data, profile)
             d.addCallbacks(
@@ -310,7 +314,9 @@
         if adv_data:  # display the search results
             log.debug("Advanced search with %s on %s" % (adv_data, service_jid))
             sub_cont.parent.set_selected(True)
-            main_ui.change_container(sub_cont.append(xml_tools.VerticalContainer(main_ui)))
+            main_ui.change_container(
+                sub_cont.append(xml_tools.VerticalContainer(main_ui))
+            )
             main_ui.addDivider("dash")
             d = self.search_request(service_jid, adv_data, profile)
             d.addCallbacks(