diff sat/plugins/plugin_tmp_directory_subscription.py @ 2624:56f94936df1e

code style reformatting using black
author Goffi <goffi@goffi.org>
date Wed, 27 Jun 2018 20:14:46 +0200
parents 26edcf3a30eb
children ab2696e34d29
line wrap: on
line diff
--- a/sat/plugins/plugin_tmp_directory_subscription.py	Wed Jun 27 07:51:29 2018 +0200
+++ b/sat/plugins/plugin_tmp_directory_subscription.py	Wed Jun 27 20:14:46 2018 +0200
@@ -21,6 +21,7 @@
 from sat.core.i18n import _, D_
 from sat.core.constants import Const as C
 from sat.core.log import getLogger
+
 log = getLogger(__name__)
 
 
@@ -33,7 +34,7 @@
     C.PI_RECOMMENDATIONS: [],
     C.PI_MAIN: "DirectorySubscription",
     C.PI_HANDLER: "no",
-    C.PI_DESCRIPTION: _("""Implementation of directory subscription""")
+    C.PI_DESCRIPTION: _("""Implementation of directory subscription"""),
 }
 
 
@@ -42,11 +43,15 @@
 
 
 class DirectorySubscription(object):
-
     def __init__(self, host):
         log.info(_("Directory subscription plugin initialization"))
         self.host = host
-        host.importMenu((D_("Service"), D_("Directory subscription")), self.subscribe, security_limit=1, help_string=D_("User directory subscription"))
+        host.importMenu(
+            (D_("Service"), D_("Directory subscription")),
+            self.subscribe,
+            security_limit=1,
+            help_string=D_("User directory subscription"),
+        )
 
     def subscribe(self, raw_data, profile):
         """Request available commands on the jabber search service associated to profile's host.
@@ -59,7 +64,9 @@
 
         def got_services(services):
             service_jid = services[0]
-            session_id, session_data = self.host.plugins["XEP-0050"].requesting.newSession(profile=profile)
+            session_id, session_data = self.host.plugins[
+                "XEP-0050"
+            ].requesting.newSession(profile=profile)
             session_data["jid"] = service_jid
             session_data["node"] = CMD_UPDATE_SUBSCRIBTION
             data = {"session_id": session_id}