chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
from typing import Any, List
|
||||
|
||||
|
||||
def split(items: List[Any], chunk_size: int):
|
||||
"""Splits provided list into chunks of given size"""
|
||||
|
||||
assert chunk_size > 0, "Chunk size has to be > 0"
|
||||
|
||||
for i in range(0, len(items), chunk_size):
|
||||
yield items[i : i + chunk_size]
|
||||
Reference in New Issue
Block a user