diff --git a/pybitmessage b/pybitmessage deleted file mode 120000 index e8310385..00000000 --- a/pybitmessage +++ /dev/null @@ -1 +0,0 @@ -src \ No newline at end of file diff --git a/src/bmconfigparser.py b/src/bmconfigparser.py index a5574156..d96d994d 100644 --- a/src/bmconfigparser.py +++ b/src/bmconfigparser.py @@ -117,6 +117,7 @@ class BMConfigParser(configparser.ConfigParser): return default def items(self, section, raw=False, variables=None): + # pylint: disable=signature-differs """Return section variables as parent, but override the "raw" argument to always True""" return configparser.ConfigParser.items(self, section, True, variables) diff --git a/src/multiqueue.py b/src/multiqueue.py index 4230d050..792427a0 100644 --- a/src/multiqueue.py +++ b/src/multiqueue.py @@ -22,7 +22,7 @@ class MultiQueue(Queue.Queue): Queue.Queue.__init__(self, maxsize) # Initialize the queue representation - def _init(self, maxsize): + def _init(self, _): self.iter = 0 self.queues = [] for _ in range(self.queueCount): diff --git a/src/network/bmproto.py b/src/network/bmproto.py index 5c57748a..adca21f5 100644 --- a/src/network/bmproto.py +++ b/src/network/bmproto.py @@ -1,7 +1,7 @@ """ Bitmessage Protocol """ -# pylint: disable=attribute-defined-outside-init, too-few-public-methods +# pylint: disable=attribute-defined-outside-init, too-few-public-methods, logging-format-interpolation import base64 import hashlib import logging @@ -123,7 +123,8 @@ class BMProto(AdvancedDispatcher, ObjectTracker): length=protocol.Header.size, expectBytes=self.payloadLength) return True - def state_bm_command(self): # pylint: disable=too-many-branches, too-many-statements + def state_bm_command(self): + # pylint: disable=too-many-branches, too-many-statements """Process incoming command""" self.payload = self.read_buf[:self.payloadLength] if self.checksum != hashlib.sha512(self.payload).digest()[0:4]: diff --git a/src/network/connectionchooser.py b/src/network/connectionchooser.py index 87fea685..4ea36a02 100644 --- a/src/network/connectionchooser.py +++ b/src/network/connectionchooser.py @@ -1,7 +1,7 @@ """ Select which node to connect to """ -# pylint: disable=too-many-branches +# pylint: disable=too-many-branches, logging-format-interpolation, unidiomatic-typecheck import logging import random # nosec diff --git a/src/network/connectionpool.py b/src/network/connectionpool.py index 5e59d99d..36f8c2b3 100644 --- a/src/network/connectionpool.py +++ b/src/network/connectionpool.py @@ -190,7 +190,7 @@ class BMConnectionPool(object): def startListening(self, bind=None): """Open a listening socket and start accepting connections on it""" if bind is None: - "this return blank host" + """this return blank host""" bind = self.getListeningIP() port = BMConfigParser().safeGetInt("bitmessagesettings", "port") # correct port even if it changed diff --git a/src/network/tcp.py b/src/network/tcp.py index 33ac4df5..47553751 100644 --- a/src/network/tcp.py +++ b/src/network/tcp.py @@ -30,7 +30,7 @@ from network.socks5 import Socks5Connection from network.tls import TLSDispatcher from .node import Peer from queues import UISignalQueue, invQueue, receiveDataQueue - +# pylint: disable=logging-format-interpolation logger = logging.getLogger('default') diff --git a/src/protocol.py b/src/protocol.py index 8b6a71d8..6f84236e 100644 --- a/src/protocol.py +++ b/src/protocol.py @@ -2,7 +2,7 @@ Low-level protocol-related functions. """ # pylint: disable=too-many-boolean-expressions,too-many-return-statements -# pylint: disable=too-many-locals,too-many-statements +# pylint: disable=too-many-locals,too-many-statements,logging-format-interpolation import base64 import hashlib @@ -65,6 +65,7 @@ Header = Struct('!L12sL4s') VersionPacket = Struct('>LqQ20s4s36sH') # Bitfield +# pylint: disable=unidiomatic-typecheck def getBitfield(address): diff --git a/src/shared.py b/src/shared.py index b1a19c08..0f2a816c 100644 --- a/src/shared.py +++ b/src/shared.py @@ -24,7 +24,7 @@ from addresses import decodeAddress, encodeVarint from bmconfigparser import BMConfigParser from debug import logger from helper_sql import sqlQuery - +# pylint: disable=logging-format-interpolation verbose = 1 # This is obsolete with the change to protocol v3 diff --git a/src/tests/test_networkgroup.py b/src/tests/test_networkgroup.py index 76cfb033..14e61a8e 100644 --- a/src/tests/test_networkgroup.py +++ b/src/tests/test_networkgroup.py @@ -10,6 +10,7 @@ class TestNetworkGroup(unittest.TestCase): """ def test_network_group(self): """Test various types of network groups""" + # pylint: disable=import-error from pybitmessage.protocol import network_group test_ip = '1.2.3.4'