Skip to content

Commit 26962e5

Browse files
committed
Code quality
1 parent bb9065e commit 26962e5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/network/tls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
class TLSDispatcher(AdvancedDispatcher):
4545
"""TLS functionality for classes derived from AdvancedDispatcher"""
4646
# pylint: disable=too-many-instance-attributes, too-many-arguments
47-
# pylint: disable=super-init-not-called
47+
# pylint: disable=super-init-not-called, unused-argument
4848
def __init__(self, _=None, sock=None, certfile=None, keyfile=None,
4949
server_side=False, ciphers=sslProtocolCiphers):
5050
self.want_read = self.want_write = True

src/network/udp.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class UDPSocket(BMProto): # pylint: disable=too-many-instance-attributes
2121
port = 8444
2222

2323
def __init__(self, host=None, sock=None, announcing=False):
24-
# pylint: disable=bad-super-call
24+
# pylint: disable=bad-super-call, access-member-before-definition
2525
super(BMProto, self).__init__(sock=sock)
2626
self.verackReceived = True
2727
self.verackSent = True
@@ -97,22 +97,30 @@ def bm_command_addr(self):
9797
time.time()
9898
return True
9999

100+
# override the protocol do ignore the following commands on UDP
101+
# we do this mainly for security reasons
100102
def bm_command_portcheck(self):
103+
# pylint: disable=no-self-use
101104
return True
102105

103106
def bm_command_ping(self):
107+
# pylint: disable=no-self-use
104108
return True
105109

106110
def bm_command_pong(self):
111+
# pylint: disable=no-self-use
107112
return True
108113

109114
def bm_command_verack(self):
115+
# pylint: disable=no-self-use
110116
return True
111117

112118
def bm_command_version(self):
119+
# pylint: disable=no-self-use
113120
return True
114121

115122
def handle_connect(self):
123+
# pylint: disable=no-self-use
116124
return
117125

118126
def writable(self):

0 commit comments

Comments
 (0)