mypy: strict optional fixes.

This commit is contained in:
Christian Hudon
2017-05-24 12:28:26 -07:00
committed by Tim Abbott
parent 2f227a97d3
commit 1761a3b1c1
4 changed files with 7 additions and 4 deletions

View File

@@ -163,6 +163,7 @@ def query_chunker(queries, id_collector=None, chunk_size=1000, db_chunk_size=Non
q = q.order_by('id')
min_id = -1
while True:
assert db_chunk_size is not None # Hint for mypy, but also workaround for mypy bug #3442.
rows = list(q.filter(id__gt=min_id)[0:db_chunk_size])
if len(rows) == 0:
break