diff sat/plugins/plugin_misc_watched.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 003b8b4b56a7
line wrap: on
line diff
--- a/sat/plugins/plugin_misc_watched.py	Wed Jun 27 07:51:29 2018 +0200
+++ b/sat/plugins/plugin_misc_watched.py	Wed Jun 27 20:14:46 2018 +0200
@@ -20,6 +20,7 @@
 from sat.core.i18n import _, D_
 from sat.core.constants import Const as C
 from sat.core.log import getLogger
+
 log = getLogger(__name__)
 from sat.core import exceptions
 from sat.tools import xml_tools
@@ -33,7 +34,9 @@
     C.PI_DEPENDENCIES: [],
     C.PI_MAIN: "Watched",
     C.PI_HANDLER: "no",
-    C.PI_DESCRIPTION: _("""Watch for entities presence, and send notification accordingly""")
+    C.PI_DESCRIPTION: _(
+        """Watch for entities presence, and send notification accordingly"""
+    ),
 }
 
 
@@ -51,11 +54,9 @@
     </category>
     </individual>
     </params>
-    """.format(category_name=CATEGORY,
-               category_label=_(CATEGORY),
-               name=NAME,
-               label=_(NAME),
-              )
+    """.format(
+        category_name=CATEGORY, category_label=_(CATEGORY), name=NAME, label=_(NAME)
+    )
 
     def __init__(self, host):
         log.info(_("Watched initialisation"))
@@ -76,6 +77,13 @@
         if old_show == C.PRESENCE_UNAVAILABLE:
             watched = self.host.memory.getParamA(NAME, CATEGORY, profile_key=profile)
             if entity in watched or entity.userhostJID() in watched:
-                self.host.actionNew({'xmlui': xml_tools.note(_(NOTIF).format(entity=entity.full())).toXml()}, profile=profile)
+                self.host.actionNew(
+                    {
+                        "xmlui": xml_tools.note(
+                            _(NOTIF).format(entity=entity.full())
+                        ).toXml()
+                    },
+                    profile=profile,
+                )
 
         return True