mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
minor changes to hush newer pyflakes
apparently it can now detect aliasing from inside list comprehensions
This commit is contained in:
parent
a3891d98d7
commit
2b6975d3a4
@ -514,9 +514,9 @@ class DownloadNode:
|
||||
if t[0] != segnum]
|
||||
return retire
|
||||
|
||||
def _cancel_request(self, c):
|
||||
def _cancel_request(self, cancel):
|
||||
self._segment_requests = [t for t in self._segment_requests
|
||||
if t[2] != c]
|
||||
if t[2] != cancel]
|
||||
segnums = [segnum for (segnum,d,c,seg_ev,lp) in self._segment_requests]
|
||||
# self._active_segment might be None in rare circumstances, so make
|
||||
# sure we tolerate it
|
||||
|
@ -1986,7 +1986,7 @@ class StringSpans(unittest.TestCase):
|
||||
self.failUnlessEqual(ds.len(), 0)
|
||||
self.failUnlessEqual(list(ds._dump()), [])
|
||||
self.failUnlessEqual(sum([len(d) for (s,d) in ds.get_chunks()]), 0)
|
||||
s = ds.get_spans()
|
||||
s1 = ds.get_spans()
|
||||
self.failUnlessEqual(ds.get(0, 4), None)
|
||||
self.failUnlessEqual(ds.pop(0, 4), None)
|
||||
ds.remove(0, 4)
|
||||
@ -1995,8 +1995,8 @@ class StringSpans(unittest.TestCase):
|
||||
self.failUnlessEqual(ds.len(), 4)
|
||||
self.failUnlessEqual(list(ds._dump()), [2,3,4,5])
|
||||
self.failUnlessEqual(sum([len(d) for (s,d) in ds.get_chunks()]), 4)
|
||||
s = ds.get_spans()
|
||||
self.failUnless((2,2) in s)
|
||||
s1 = ds.get_spans()
|
||||
self.failUnless((2,2) in s1)
|
||||
self.failUnlessEqual(ds.get(0, 4), None)
|
||||
self.failUnlessEqual(ds.pop(0, 4), None)
|
||||
self.failUnlessEqual(ds.get(4, 4), None)
|
||||
|
Loading…
Reference in New Issue
Block a user