##// END OF EJS Templates
typing: add a couple of assertions to lrucachedict to help pytype...
Matt Harbison -
r44333:b5655f33 default
parent child Browse files
Show More
@@ -1480,6 +1480,8 b' class lrucachedict(object):'
1480 if default is _notset:
1480 if default is _notset:
1481 raise
1481 raise
1482 return default
1482 return default
1483
1484 assert node is not None # help pytype
1483 value = node.value
1485 value = node.value
1484 self.totalcost -= node.cost
1486 self.totalcost -= node.cost
1485 node.markempty()
1487 node.markempty()
@@ -1567,6 +1569,8 b' class lrucachedict(object):'
1567 while n.key is _notset:
1569 while n.key is _notset:
1568 n = n.prev
1570 n = n.prev
1569
1571
1572 assert n is not None # help pytype
1573
1570 key, value = n.key, n.value
1574 key, value = n.key, n.value
1571
1575
1572 # And remove it from the cache and mark it as empty.
1576 # And remove it from the cache and mark it as empty.
General Comments 0
You need to be logged in to leave comments. Login now