Changes based on style and lint checks. (final_code_quality_7) #1365
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-12-17#1365
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "final_code_quality_7"
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_7)
@ -100,2 +114,4 @@
while self.outpos < len(self.out) and self.verticalScrollBar().value(
) >= self.document().size().height() - 2 * self.size().height():
startpos = self.outpos
self.outpos += 10240
@ -100,2 +114,4 @@
while self.outpos < len(self.out) and self.verticalScrollBar().value(
) >= self.document().size().height() - 2 * self.size().height():
startpos = self.outpos
self.outpos += 10240
@ -100,2 +114,4 @@
while self.outpos < len(self.out) and self.verticalScrollBar().value(
) >= self.document().size().height() - 2 * self.size().height():
startpos = self.outpos
self.outpos += 10240
Where did this whole section go?
@ -115,2 +175,3 @@
self.tableWidgetConnectionCount.insertRow(0)
self.tableWidgetConnectionCount.setItem(0, 0,
self.tableWidgetConnectionCount.setItem(
0, 0,
@ -38,3 +38,4 @@
for unit in ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z']:
if abs(num) < 1000.0:
return "%3.1f%s%s" % (num, unit, suffix)
@ -38,3 +38,4 @@
for unit in ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z']:
if abs(num) < 1000.0:
return "%3.1f%s%s" % (num, unit, suffix)
@ -226,19 +230,9 @@ class singleWorker(threading.Thread, StoppableThread):
# inventoryHash = calculateInventoryHash(payload)
The docstring is above the method in a comment.
@ -294,3 +286,2 @@
# assembles the pubkey and stores is in the pubkey table so that we can
# send messages to "ourselves".
def sendOutOrStoreMyV3Pubkey(self, adressHash):
"""
The docstring is before the method as a comment.
It doesn't send directly anymore. It put is to a queue for another thread to send at an appropriate time, whereas in the past it directly appended it to the outgoing buffer, I think. Same with all the other methods in this class.
Docstring below in comment.
👍 nice
Update docstrings and find out what happened to the missing section.
If this section was ever hit,
c
would not be in scope. Since we're not seeing associatedNameError
's, I assume this code is never hit.Your assumptions are incorrect. The
KeyError
handlers are there to prevent adding invalid connections. Without this section the list of connected peers will remain empty forever.I have reverted this section and added an
undefined-variable
pylint marker on the method and inlinenoqa
markers for flake8. If you can explain to me wherec
gets defined such that thesetItem()
calls don't fail I'd be keen to learn something here.You removed the assignments for
c
Please put the
c =
assignment back.Well that would explain it. Not sure how that happened, sorry. I've reverted the removal of the assignments.