From 95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 10 Dec 2020 19:20:23 +0100 Subject: docs: update docstrings for sphinx conformity Remove most references to timeout/callback/ifrom/timeout_callbacks args --- slixmpp/plugins/xep_0128/extended_disco.py | 45 +++++++++++++----------------- 1 file changed, 19 insertions(+), 26 deletions(-) (limited to 'slixmpp/plugins/xep_0128') 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 . - 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) -- cgit v1.2.3