Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -61,8 +61,8 @@ DEFAULT_SERVICE_LIST = ["salut.libervia.org"]
|
|||
|
||||
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 @@ class XEP_0055(object):
|
|||
"""
|
||||
# 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 @@ class XEP_0055(object):
|
|||
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 @@ class XEP_0055(object):
|
|||
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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue