mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-04 04:10:20 +03:00
Use type declaration
This commit is contained in:
parent
9e77f53248
commit
942dccb576
|
@ -113,7 +113,7 @@ def minibatch_by_padded_size(
|
|||
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)
|
||||
for outer_batch in minibatch(seqs, size=buffer):
|
||||
|
|
Loading…
Reference in New Issue
Block a user