code style reformatting using black
This commit is contained in:
parent
4127bcffd0
commit
744cb0c503
1 changed files with 21394 additions and 10488 deletions
|
|
@ -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 @@ except ImportError:
|
|||
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 @@ PLUGIN_INFO = {
|
|||
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 @@ class XEP_0203(object):
|
|||
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 @@ class XEP_0203_handler(XMPPHandler):
|
|||
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 []
|
||||
|
|
|
|||
Loading…
Reference in a new issue