diff options
author | lovetox <philipp@hoerist.com> | 2020-03-10 23:41:31 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-03-10 23:41:31 +0300 |
commit | 9cd576ebf095652ee8d8f6058fb6fab3836d9a2f (patch) | |
tree | 83b8e4c508d4d5c9104eea5dc9497f24695bf1f1 /nbxmpp | |
parent | 234379a6e16431bdb18c59d8d699df0a3d2fe683 (diff) |
Fix pylint errors
- trailing-newlines
- chained-comparison
- trailing-whitespace
- unnecessary-pass
Diffstat (limited to 'nbxmpp')
-rw-r--r-- | nbxmpp/idlequeue.py | 4 | ||||
-rw-r--r-- | nbxmpp/old_dispatcher.py | 1 | ||||
-rw-r--r-- | nbxmpp/protocol.py | 3 | ||||
-rw-r--r-- | nbxmpp/simplexml.py | 5 | ||||
-rw-r--r-- | nbxmpp/stringprepare.py | 2 |
5 files changed, 2 insertions, 13 deletions
diff --git a/nbxmpp/idlequeue.py b/nbxmpp/idlequeue.py index 0ab6f18..5236739 100644 --- a/nbxmpp/idlequeue.py +++ b/nbxmpp/idlequeue.py @@ -86,25 +86,21 @@ class IdleObject: """ Called on stream failure """ - pass def pollin(self): """ Called on new read event """ - pass def pollout(self): """ Called on new write event (connect in sockets is a pollout) """ - pass def read_timeout(self): """ Called when timeout happened """ - pass class IdleCommand(IdleObject): diff --git a/nbxmpp/old_dispatcher.py b/nbxmpp/old_dispatcher.py index ccaef24..b671d5e 100644 --- a/nbxmpp/old_dispatcher.py +++ b/nbxmpp/old_dispatcher.py @@ -458,7 +458,6 @@ class XMPPDispatcher(PlugIn): log.warning( 'Unregister failed: %s for "%s" type->%s ns->%s(%s)', handler, name, typ, ns, xmlns) - pass def RegisterDefaultHandler(self, handler): """ diff --git a/nbxmpp/protocol.py b/nbxmpp/protocol.py index af0222b..b4e8842 100644 --- a/nbxmpp/protocol.py +++ b/nbxmpp/protocol.py @@ -592,13 +592,11 @@ class NodeProcessed(Exception): Exception that should be raised by handler when the handling should be stopped """ - pass class StreamError(Exception): """ Base exception class for stream errors """ - pass class BadFormat(StreamError): pass @@ -2209,4 +2207,3 @@ class DataForm(Node): Simple dictionary interface for setting datafields values by their names """ return self.setField(name).setValue(val) - diff --git a/nbxmpp/simplexml.py b/nbxmpp/simplexml.py index dd83340..af0a2ed 100644 --- a/nbxmpp/simplexml.py +++ b/nbxmpp/simplexml.py @@ -93,7 +93,7 @@ class Node: self.nsp_cache = {} if nsp: for k, v in nsp.items(): self.nsp_cache[k] = v - + if attrs is not None: for attr, val in attrs.items(): if attr == 'xmlns': @@ -688,7 +688,6 @@ class NodeBuilder: up with the built node as argument. Can be redefined to convert incoming XML stanzas to program events """ - pass def stream_header_received(self): """ @@ -706,7 +705,7 @@ class NodeBuilder: """ Return True if at least one end tag was seen (at level) """ - return self.__depth <= level and self.__max_depth > level + return self.__depth <= level < self.__max_depth def _inc_depth(self): self.__last_depth = self.__depth diff --git a/nbxmpp/stringprepare.py b/nbxmpp/stringprepare.py index dfc1261..99bcc34 100644 --- a/nbxmpp/stringprepare.py +++ b/nbxmpp/stringprepare.py @@ -35,7 +35,6 @@ class ILookupTable: """ Return whether character is in this table """ - pass class IMappingTable: @@ -47,7 +46,6 @@ class IMappingTable: """ Return mapping for character """ - pass class LookupTableFromFunction: |