diff options
author | lovetox <philipp@hoerist.com> | 2020-03-11 19:31:55 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-03-11 21:00:54 +0300 |
commit | d387550533d0ad997bc5e688a3aac13786847e7b (patch) | |
tree | c705db0a9e1be4ab598e73809c5d20de10d2518f /nbxmpp | |
parent | 56581a8797482bf97109f825bdeb94bcd8735eeb (diff) |
Fix pylint errors
- unused-argument
- self-assigning-variable
Diffstat (limited to 'nbxmpp')
-rw-r--r-- | nbxmpp/old_dispatcher.py | 10 | ||||
-rw-r--r-- | nbxmpp/protocol.py | 2 | ||||
-rw-r--r-- | nbxmpp/simplexml.py | 2 | ||||
-rw-r--r-- | nbxmpp/third_party/hsluv.py | 4 | ||||
-rw-r--r-- | nbxmpp/util.py | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/nbxmpp/old_dispatcher.py b/nbxmpp/old_dispatcher.py index 1e8d933..82a8e03 100644 --- a/nbxmpp/old_dispatcher.py +++ b/nbxmpp/old_dispatcher.py @@ -247,7 +247,7 @@ class XMPPDispatcher(PlugIn): self.RegisterEventHandler(self._owner._caller._event_dispatcher) self._register_modules() - def plugin(self, owner): + def plugin(self, _owner): """ Plug the Dispatcher instance into Client class instance and send initial stream header. Used internally @@ -343,7 +343,7 @@ class XMPPDispatcher(PlugIn): return '0' return len(data) - def RegisterNamespace(self, xmlns, order='info'): + def RegisterNamespace(self, xmlns): """ Create internal structures for newly registered namespace @@ -356,7 +356,7 @@ class XMPPDispatcher(PlugIn): self.RegisterProtocol('unknown', Protocol, xmlns=xmlns) self.RegisterProtocol('default', Protocol, xmlns=xmlns) - def RegisterProtocol(self, tag_name, proto, xmlns=None, order='info'): + def RegisterProtocol(self, tag_name, proto, xmlns=None): """ Used to declare some top-level stanza name to dispatcher @@ -406,9 +406,9 @@ class XMPPDispatcher(PlugIn): handler, name, typ, ns, xmlns, priority) if xmlns not in self.handlers: - self.RegisterNamespace(xmlns, 'warn') + self.RegisterNamespace(xmlns) if name not in self.handlers[xmlns]: - self.RegisterProtocol(name, Protocol, xmlns, 'warn') + self.RegisterProtocol(name, Protocol, xmlns) specific = typ + ns if specific not in self.handlers[xmlns][name]: diff --git a/nbxmpp/protocol.py b/nbxmpp/protocol.py index fabfec8..5fc0cd4 100644 --- a/nbxmpp/protocol.py +++ b/nbxmpp/protocol.py @@ -1919,7 +1919,7 @@ class Error(Protocol): if node.getType() == 'error': self.__str__ = self.__dupstr__ - def __dupstr__(self, dup1=None, dup2=None): + def __dupstr__(self, _dup1=None, _dup2=None): """ Dummy function used as preventor of creating error node in reply to error node. I.e. you will not be able to serialise "double" error into string. diff --git a/nbxmpp/simplexml.py b/nbxmpp/simplexml.py index 8f67e09..67427b1 100644 --- a/nbxmpp/simplexml.py +++ b/nbxmpp/simplexml.py @@ -672,7 +672,7 @@ class NodeBuilder: def handle_invalid_xmpp_element(*args): raise ExpatError('Found invalid xmpp stream element: %s' % str(args)) - def handle_namespace_start(self, prefix, uri): + def handle_namespace_start(self, _prefix, _uri): """ XML Parser callback. Used internally """ diff --git a/nbxmpp/third_party/hsluv.py b/nbxmpp/third_party/hsluv.py index 22b5db4..7bed22b 100644 --- a/nbxmpp/third_party/hsluv.py +++ b/nbxmpp/third_party/hsluv.py @@ -79,7 +79,7 @@ def _max_safe_chroma_for_l(l): _g = _g + 1 length = _distance_line_from_origin(bounds[i]) if math.isnan(_hx_min): - _hx_min = _hx_min + pass elif math.isnan(length): _hx_min = length else: @@ -98,7 +98,7 @@ def _max_chroma_for_lh(l, h): length = _length_of_ray_until_intersect(hrad, bound) if length >= 0: if math.isnan(_hx_min): - _hx_min = _hx_min + pass elif math.isnan(length): _hx_min = length else: diff --git a/nbxmpp/util.py b/nbxmpp/util.py index a9cb0e2..5d463a0 100644 --- a/nbxmpp/util.py +++ b/nbxmpp/util.py @@ -97,7 +97,7 @@ def call_on_response(cb): if isinstance(stanza, tuple): stanza, attrs = stanza else: - stanza, attrs = stanza, {} + attrs = {} if user_data is not None: attrs['user_data'] = user_data |