Handle flake8=5.0 code style warnings

This commit is contained in:
Philipp Wolfer
2022-07-31 13:31:39 +02:00
parent 41d204c17d
commit 095e8b7615
3 changed files with 3 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ class ReleaseTypeScore:
class RowColIter:
def __init__(self, max_cells, max_cols=6, step=2):
assert(max_cols % step == 0)
assert max_cols % step == 0
self.step = step
self.cols = max_cols
self.rows = int((max_cells - 1) / (self.cols / step)) + 1

View File

@@ -141,7 +141,7 @@ def increment_requests(hostkey):
def decrement_requests(hostkey):
"""Decrement counter, it has to be called on each reply
"""
assert(CONGESTION_UNACK[hostkey] > 0)
assert CONGESTION_UNACK[hostkey] > 0
CONGESTION_UNACK[hostkey] -= 1
log.debug("%s: Decrementing requests to: %d", hostkey, CONGESTION_UNACK[hostkey])

View File

@@ -168,7 +168,7 @@ class TestPreserveTimes(PicardTestCase):
# access times may not be equal
# time difference should be positive and reasonably low (if no access in between, it should be 0)
delta = after_atime_ns - before_atime_ns
tolerance = 10**7 #  0.01 seconds
tolerance = 10**7 # 0.01 seconds
self.assertTrue(0 <= delta < tolerance, "0 <= %s < %s" % (delta, tolerance))
# ensure written data can be read back