diff --git a/src/netius/base/asynchronous.py b/src/netius/base/asynchronous.py index 63b854316..d104a9ebc 100644 --- a/src/netius/base/asynchronous.py +++ b/src/netius/base/asynchronous.py @@ -40,10 +40,10 @@ # imports the base (old) version of the async implementation # that should be compatible with all the available python # interpreters, base collection of async library -from .async_old import * #@UnusedWildImport +from .async_old import * #@UnusedWildImport pylint: disable=W0614 # verifies if the current python interpreter version supports # the new version of the async implementation and if that's the # case runs the additional import of symbols, this should override # most of the symbols that have just been created -if is_neo(): from .async_neo import * #@UnusedWildImport +if is_neo(): from .async_neo import * #@UnusedWildImport pylint: disable=W0614 diff --git a/src/netius/base/common.py b/src/netius/base/common.py index 3c0f79863..810e3e6eb 100644 --- a/src/netius/base/common.py +++ b/src/netius/base/common.py @@ -751,7 +751,7 @@ def ensure( # creates the coroutine that is going to be used to # encapsulate the callable, note that the result of the # callable is set as the result of the future (as expected) - def coroutine(future, *args, **kwargs): + def coroutine(future, *args, **kwargs): #pylint ignore=E0102 yield result = coroutine_c(*args, **kwargs) future.set_result(result) diff --git a/src/netius/base/protocol.py b/src/netius/base/protocol.py index 9fc474164..f0b1c9f4f 100644 --- a/src/netius/base/protocol.py +++ b/src/netius/base/protocol.py @@ -262,8 +262,8 @@ def _flush_send(self): if not self._delayed: break if not self._writing: break data, address, callback = self._delayed.pop(0) - if address: self.send(data, address, callback = callback) - else: self.send(data, callback = callback) + if address: self.send(data, address, callback = callback) #pylint: disable=E1101 + else: self.send(data, callback = callback) #pylint: disable=E1101 class DatagramProtocol(Protocol): diff --git a/src/netius/base/server.py b/src/netius/base/server.py index db14910fd..4c68882bd 100644 --- a/src/netius/base/server.py +++ b/src/netius/base/server.py @@ -37,7 +37,7 @@ __license__ = "Apache License, Version 2.0" """ The license for the module """ -from .common import * #@UnusedWildImport +from .common import * #@UnusedWildImport pylint: disable=W0614 BUFFER_SIZE_S = None """ The size of both the send and receive buffers for @@ -229,7 +229,7 @@ def serve( # checks the type of service that is meant to be created and # creates a service socket according to the defined service family = socket.AF_INET6 if ipv6 else socket.AF_INET - family = socket.AF_UNIX if is_unix else family + family = socket.AF_UNIX if is_unix else family #@UndefinedVariable pylint: disable=E1101 if type == TCP_TYPE: self.socket = self.socket_tcp( ssl, key_file = key_file, @@ -257,7 +257,7 @@ def serve( # in case the set user id value the user of the current process should # be changed so that it represents the new (possibly unprivileged user) - if setuid: os.setuid(setuid) + if setuid: os.setuid(setuid) #pylint: disable=E1101 # in case the selected port is zero based, meaning that a randomly selected # port has been assigned by the bind operation the new port must be retrieved diff --git a/src/netius/clients/http.py b/src/netius/clients/http.py index 314909f55..574e95f2e 100644 --- a/src/netius/clients/http.py +++ b/src/netius/clients/http.py @@ -826,7 +826,7 @@ def wrap_request( buffer = tempfile.NamedTemporaryFile(mode = "w+b") if use_file else [] self.request = dict(code = None, data = None) - def on_close(protocol): + def on_close(protocol): #pylint: disable=E0102 if _on_close: _on_close(protocol) protocol._request = None if self.request["code"]: return @@ -836,7 +836,7 @@ def on_close(protocol): request = self.request ) - def on_data(protocol, parser, data): + def on_data(protocol, parser, data): #pylint: disable=E0102 if _on_data: _on_data(protocol, parser, data) if use_file: buffer.write(data) else: buffer.append(data) @@ -844,7 +844,7 @@ def on_data(protocol, parser, data): self.request["received"] = received + len(data) self.request["last"] = time.time() - def callback(protocol, parser, message): + def callback(protocol, parser, message): #pylint: disable=E0102 if _callback: _callback(protocol, parser, message) if use_file: cls.set_request_file(parser, buffer, request = self.request) else: cls.set_request(parser, buffer, request = self.request) @@ -1426,7 +1426,7 @@ def on_message(protocol, parser, message): self.available[protocol.key] = protocol netius.compat_loop(loop).stop() - def on_close(protocol): + def on_close(protocol): #pylint: disable=E0102 # verifies if the protocol being closed is currently in # the pool of available protocols, so that decisions on # the stopping of the event loop may be made latter on