Yann Leboulanger pushed to branch master at gajim / python-nbxmpp
Commits: eb88300e by Yann Leboulanger at 2016-11-02T22:31:45+01:00 adapt different comment styles to make them equal
- - - - -
6 changed files:
- nbxmpp/auth_nb.py - nbxmpp/client_nb.py - nbxmpp/dispatcher_nb.py - nbxmpp/features_nb.py - nbxmpp/smacks.py - nbxmpp/tls_nb.py
Changes:
===================================== nbxmpp/auth_nb.py ===================================== --- a/nbxmpp/auth_nb.py +++ b/nbxmpp/auth_nb.py @@ -663,7 +663,7 @@ class NonBlockingBind(PlugIn): self.resuming = False
def plugin(self, owner): - ''' Start resource binding, if allowed at this time. Used internally. ''' + """ Start resource binding, if allowed at this time. Used internally. """ if self._owner.Dispatcher.Stream.features: try: self.FeaturesHandler(self._owner.Dispatcher,
===================================== nbxmpp/client_nb.py ===================================== --- a/nbxmpp/client_nb.py +++ b/nbxmpp/client_nb.py @@ -160,6 +160,7 @@ class NonBlockingClient: :param port: port number of XMPP server :param on_proxy_failure: called if error occurs during TCP connection to proxy server or during proxy connecting process + :param on_stream_error_cb: called if error occurs :param proxy: dictionary with proxy data. It should contain at least values for keys 'host' and 'port' - connection details for proxy serve and optionally keys 'user' and 'pass' as proxy credentials
===================================== nbxmpp/dispatcher_nb.py ===================================== --- a/nbxmpp/dispatcher_nb.py +++ b/nbxmpp/dispatcher_nb.py @@ -298,6 +298,7 @@ class XMPPDispatcher(PlugIn): :param typ: value of stanza's "type" attribute. If not specified any value will match :param ns: namespace of child that stanza must contain. + :param xmlns: xml namespace :param makefirst: insert handler in the beginning of handlers list instead of adding it to the end. Note that more common handlers i.e. w/o "typ" and " will be called first nevertheless.
===================================== nbxmpp/features_nb.py ===================================== --- a/nbxmpp/features_nb.py +++ b/nbxmpp/features_nb.py @@ -213,6 +213,6 @@ def setPrivacyList(disp, listname, tags): _on_default_response(disp, iq, None)
def delPrivacyList(disp, listname, cb=None): - ''' Deletes privacy list 'listname'. Returns true on success. ''' + """ Deletes privacy list 'listname'. Returns true on success. """ iq = Iq('set', NS_PRIVACY, payload=[Node('list', {'name':listname})]) _on_default_response(disp, iq, cb)
===================================== nbxmpp/smacks.py ===================================== --- a/nbxmpp/smacks.py +++ b/nbxmpp/smacks.py @@ -94,11 +94,11 @@ class Smacks(): self._owner.Connection.send(r, False)
def check_ack(self, disp, stanza): - ''' + """ Checks if the number of stanzas sent are the same as the number of stanzas received by the server. Pops stanzas that were handled by the server from the queue. - ''' + """ h = stanza.getAttr('h') if not h: log.error('Server did not send h attribute') @@ -118,11 +118,11 @@ class Smacks(): self.uqueue.pop(0)
def check_resume(self, disp, stanza): - ''' + """ Checks if the number of stanzas sent are the same as the number of stanzas received by the server. Resends stanzas not received by the server in the last session. - ''' + """ h = stanza.getAttr('h') if not h: log.error('Server did not send h attribute')
===================================== nbxmpp/tls_nb.py ===================================== --- a/nbxmpp/tls_nb.py +++ b/nbxmpp/tls_nb.py @@ -158,7 +158,7 @@ class PyOpenSSLWrapper(SSLWrapper): self.parent.__init__(self, *args)
def is_numtoolarge(self, e): - ''' Magic methods don't need documentation ''' + """ Magic methods don't need documentation """ t = ('asn1 encoding routines', 'a2d_ASN1_OBJECT', 'first num too large') return (isinstance(e.args, (list, tuple)) and len(e.args) == 1 and isinstance(e.args[0], (list, tuple)) and len(e.args[0]) == 2 and
View it on GitLab: http://dev.gajim.org/gajim/python-nbxmpp/commit/eb88300ee0d1767ddc0e6ace4f10...