summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0128/extended_disco.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-10 19:20:23 +0100
committermathieui <mathieui@mathieui.net>2020-12-10 19:22:40 +0100
commit95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c (patch)
treeef3086be7313a8e61e51b7a3efed302d0e154cb0 /slixmpp/plugins/xep_0128/extended_disco.py
parent010bf6dd70a44d9e9087336bc955a591ab9248b3 (diff)
downloadslixmpp-95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c.tar.gz
slixmpp-95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c.tar.bz2
slixmpp-95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c.tar.xz
slixmpp-95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c.zip
docs: update docstrings for sphinx conformity
Remove most references to timeout/callback/ifrom/timeout_callbacks args
Diffstat (limited to 'slixmpp/plugins/xep_0128/extended_disco.py')
-rw-r--r--slixmpp/plugins/xep_0128/extended_disco.py45
1 files changed, 19 insertions, 26 deletions
diff --git a/slixmpp/plugins/xep_0128/extended_disco.py b/slixmpp/plugins/xep_0128/extended_disco.py
index bf3971e3..ae4f149a 100644
--- a/slixmpp/plugins/xep_0128/extended_disco.py
+++ b/slixmpp/plugins/xep_0128/extended_disco.py
@@ -8,8 +8,10 @@
import logging
+from typing import Optional
+
import slixmpp
-from slixmpp import Iq
+from slixmpp import Iq, JID
from slixmpp.xmlstream import register_stanza_plugin
from slixmpp.plugins import BasePlugin
from slixmpp.plugins.xep_0004 import Form
@@ -27,16 +29,9 @@ class XEP_0128(BasePlugin):
Also see <http://www.xmpp.org/extensions/xep-0128.html>.
- Attributes:
- disco -- A reference to the XEP-0030 plugin.
- static -- Object containing the default set of static
- node handlers.
- xmpp -- The main Slixmpp object.
-
- Methods:
- set_extended_info -- Set extensions to a disco#info result.
- add_extended_info -- Add an extension to a disco#info result.
- del_extended_info -- Remove all extensions from a disco#info result.
+ :var disco: A reference to the XEP-0030 plugin.
+ :var static: Object containing the default set of static
+ node handlers.
"""
name = 'xep_0128'
@@ -67,12 +62,11 @@ class XEP_0128(BasePlugin):
Replaces any existing extended information.
- Arguments:
- jid -- The JID to modify.
- node -- The node to modify.
- data -- Either a form, or a list of forms to use
- as extended information, replacing any
- existing extensions.
+ :param jid: The JID to modify.
+ :param node: The node to modify.
+ :param data: Either a form, or a list of forms to use
+ as extended information, replacing any
+ existing extensions.
"""
self.api['set_extended_info'](jid, node, None, kwargs)
@@ -80,20 +74,19 @@ class XEP_0128(BasePlugin):
"""
Add additional, extended identity information to a node.
- Arguments:
- jid -- The JID to modify.
- node -- The node to modify.
- data -- Either a form, or a list of forms to add
- as extended information.
+ :param jid: The JID to modify.
+ :param node: The node to modify.
+ :param data: Either a form, or a list of forms to add
+ as extended information.
"""
self.api['add_extended_info'](jid, node, None, kwargs)
- def del_extended_info(self, jid=None, node=None, **kwargs):
+ def del_extended_info(self, jid: Optional[JID] = None,
+ node: Optional[str] = None, **kwargs):
"""
Remove all extended identity information to a node.
- Arguments:
- jid -- The JID to modify.
- node -- The node to modify.
+ :param jid: The JID to modify.
+ :param node: The node to modify.
"""
self.api['del_extended_info'](jid, node, None, kwargs)