Convert another comment into a proper type declaration

This commit is contained in:
Daniël de Kok 2023-01-17 14:20:43 +01:00
parent 942dccb576
commit 01fb400c54

View File

@ -149,7 +149,7 @@ def minibatch_by_words(
item. The `len` function is used by default.
"""
if isinstance(size, int):
size_ = itertools.repeat(size) # type: Iterator[int]
size_: Iterator[int] = itertools.repeat(size)
else:
size_ = iter(size)
target_size = next(size_)