Changes based on style and lint checks. (final_code_quality_19) #1401
No reviewers
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-11-28#1401
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "final_code_quality_19"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes based on style and lint checks. (final_code_quality_19)
@ -43,2 +53,4 @@
return start + expovariate(1.0 / average) + FLUFF_TRIGGER_FIXED_DELAY
def addHash(self, hashId, source=None, stream=1):
""""""
@ -67,12 +81,15 @@ class Dandelion():
pass
def hasHash(self, hashId):
""""""
@ -75,3 +91,4 @@
def maybeAddStem(self, connection):
""""""
# fewer than MAX_STEMS outbound connections at last reshuffle?
with self.lock:
@ -88,3 +104,4 @@
""""""
# is the stem active?
with self.lock:
if connection in self.stem:
@ -99,3 +116,4 @@
""""""
try:
# pick a random from available stems
stem = choice(range(len(self.stem)))
@ -112,6 +130,7 @@ class Dandelion():
return None
def getNodeStem(self, node=None):
""""""
@ -115,3 +133,4 @@
""""""
with self.lock:
try:
return self.nodeMap[node]
@ -5,3 +12,4 @@
class Socks4aError(ProxyError):
""""""
errorCodes = ("Request granted",
@ -16,4 +25,4 @@
Proxy.__init__(self, address)
self.ipaddr = None
self.destport = address[1]
@ -22,3 +32,4 @@
return True
def state_pre_connect(self):
""""""
@ -91,12 +106,14 @@ class Socks4aConnection(Socks4a):
@ -93,3 +108,4 @@
class Socks4aResolver(Socks4a):
""""""
def __init__(self, host):
self.host = host
@ -97,3 +113,4 @@
Socks4a.__init__(self, address=(self.host, self.port))
def state_auth_done(self):
""""""
Update docstrings, otherwise ok.