diff sat/plugins/plugin_xep_0203.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_xep_0203.py	Wed Jun 27 07:51:29 2018 +0200
+++ b/sat/plugins/plugin_xep_0203.py	Wed Jun 27 20:14:46 2018 +0200
@@ -21,9 +21,11 @@
 from sat.core.i18n import _
 from sat.core.constants import Const as C
 from sat.core.log import getLogger
+
 log = getLogger(__name__)
 
 from wokkel import disco, iwokkel, delay
+
 try:
     from twisted.words.protocols.xmlstream import XMPPHandler
 except ImportError:
@@ -31,7 +33,7 @@
 from zope.interface import implements
 
 
-NS_DD = 'urn:xmpp:delay'
+NS_DD = "urn:xmpp:delay"
 
 PLUGIN_INFO = {
     C.PI_NAME: "Delayed Delivery",
@@ -40,12 +42,11 @@
     C.PI_PROTOCOLS: ["XEP-0203"],
     C.PI_MAIN: "XEP_0203",
     C.PI_HANDLER: "yes",
-    C.PI_DESCRIPTION: _("""Implementation of Delayed Delivery""")
+    C.PI_DESCRIPTION: _("""Implementation of Delayed Delivery"""),
 }
 
 
 class XEP_0203(object):
-
     def __init__(self, host):
         log.info(_("Delayed Delivery plugin initialization"))
         self.host = host
@@ -53,7 +54,7 @@
     def getHandler(self, client):
         return XEP_0203_handler(self, client.profile)
 
-    def delay(self, stamp, sender=None, desc='', parent=None):
+    def delay(self, stamp, sender=None, desc="", parent=None):
         """Build a delay element, eventually append it to the given parent element.
 
         @param stamp (datetime): offset-aware timestamp of the original sending.
@@ -78,8 +79,8 @@
         self.host = plugin_parent.host
         self.profile = profile
 
-    def getDiscoInfo(self, requestor, target, nodeIdentifier=''):
+    def getDiscoInfo(self, requestor, target, nodeIdentifier=""):
         return [disco.DiscoFeature(NS_DD)]
 
-    def getDiscoItems(self, requestor, target, nodeIdentifier=''):
+    def getDiscoItems(self, requestor, target, nodeIdentifier=""):
         return []