comparison sat/plugins/plugin_xep_0059.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 035901dc946d
comparison
equal deleted inserted replaced
2623:49533de4540b 2624:56f94936df1e
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
21 from sat.core.i18n import _ 21 from sat.core.i18n import _
22 from sat.core.constants import Const as C 22 from sat.core.constants import Const as C
23 from sat.core.log import getLogger 23 from sat.core.log import getLogger
24
24 log = getLogger(__name__) 25 log = getLogger(__name__)
25 26
26 from wokkel import disco 27 from wokkel import disco
27 from wokkel import iwokkel 28 from wokkel import iwokkel
28 from wokkel import rsm 29 from wokkel import rsm
36 C.PI_IMPORT_NAME: "XEP-0059", 37 C.PI_IMPORT_NAME: "XEP-0059",
37 C.PI_TYPE: "XEP", 38 C.PI_TYPE: "XEP",
38 C.PI_PROTOCOLS: ["XEP-0059"], 39 C.PI_PROTOCOLS: ["XEP-0059"],
39 C.PI_MAIN: "XEP_0059", 40 C.PI_MAIN: "XEP_0059",
40 C.PI_HANDLER: "yes", 41 C.PI_HANDLER: "yes",
41 C.PI_DESCRIPTION: _("""Implementation of Result Set Management""") 42 C.PI_DESCRIPTION: _("""Implementation of Result Set Management"""),
42 } 43 }
43 44
44 45
45 class XEP_0059(object): 46 class XEP_0059(object):
46 # XXX: RSM management is done directly in Wokkel. 47 # XXX: RSM management is done directly in Wokkel.
53 54
54 55
55 class XEP_0059_handler(xmlstream.XMPPHandler): 56 class XEP_0059_handler(xmlstream.XMPPHandler):
56 implements(iwokkel.IDisco) 57 implements(iwokkel.IDisco)
57 58
58 def getDiscoInfo(self, requestor, target, nodeIdentifier=''): 59 def getDiscoInfo(self, requestor, target, nodeIdentifier=""):
59 return [disco.DiscoFeature(rsm.NS_RSM)] 60 return [disco.DiscoFeature(rsm.NS_RSM)]
60 61
61 def getDiscoItems(self, requestor, target, nodeIdentifier=''): 62 def getDiscoItems(self, requestor, target, nodeIdentifier=""):
62 return [] 63 return []