Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits: 9cd576eb by lovetox at 2020-03-10T21:41:31+01:00 Fix pylint errors
- trailing-newlines - chained-comparison - trailing-whitespace - unnecessary-pass
- - - - -
5 changed files:
- nbxmpp/idlequeue.py - nbxmpp/old_dispatcher.py - nbxmpp/protocol.py - nbxmpp/simplexml.py - nbxmpp/stringprepare.py
Changes:
===================================== 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):
===================================== 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): """
===================================== 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) -
===================================== 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
===================================== 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:
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/9cd576ebf095652ee8d8f6058...