Skip to content

Commit 369bec4

Browse files
committed
proxy pylint fixes
1 parent ac63079 commit 369bec4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/network/proxy.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
src/network/proxy.py
3+
====================
4+
"""
5+
# pylint: disable=protected-access
16
import socket
27
import time
38

@@ -56,7 +61,7 @@ def proxy(self):
5661
def proxy(self, address):
5762
"""Set proxy IP and port"""
5863
if (not isinstance(address, tuple) or len(address) < 2 or
59-
not isinstance(address[0], str) or
64+
not isinstance(address[0], str) or
6065
not isinstance(address[1], int)):
6166
raise ValueError
6267
self.__class__._proxy = address
@@ -83,8 +88,8 @@ def onion_proxy(self):
8388
def onion_proxy(self, address):
8489
"""Set onion proxy address"""
8590
if address is not None and (
86-
not isinstance(address, tuple) or len(address) < 2 or
87-
not isinstance(address[0], str) or
91+
not isinstance(address, tuple) or len(address) < 2 or
92+
not isinstance(address[0], str) or
8893
not isinstance(address[1], int)):
8994
raise ValueError
9095
self.__class__._onion_proxy = address
@@ -138,5 +143,5 @@ def handle_connect(self):
138143

139144
def state_proxy_handshake_done(self):
140145
"""Handshake is complete at this point"""
141-
self.connectedAt = time.time()
146+
self.connectedAt = time.time() # pylint: disable=attribute-defined-outside-init
142147
return False

0 commit comments

Comments
 (0)