Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/crawlee/base_storage_client/_base_dataset_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ async def iterate_items(
An asynchronous iterator of dictionary objects, each representing a dataset item after applying
the specified filters and transformations.
"""
# This syntax is to make mypy properly work with abstract AsyncIterator.
# https://mypy.readthedocs.io/en/stable/more_types.html#asynchronous-iterators
raise NotImplementedError
if False: # type: ignore[unreachable]
yield 0

@abstractmethod
async def get_items_as_bytes(
Expand Down
2 changes: 1 addition & 1 deletion src/crawlee/memory_storage_client/_dataset_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async def list_items(
)

@override
async def iterate_items( # type: ignore
async def iterate_items(
self,
*,
offset: int = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/crawlee/storages/_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ async def iterate_items(
Yields:
Each item from the dataset as a dictionary.
"""
async for item in self._resource_client.iterate_items( # type: ignore
async for item in self._resource_client.iterate_items(
offset=offset,
limit=limit,
clean=clean,
Expand Down
Loading