From a084b088eb31966956f3bb1b7b99ac1e2623f9b4 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Wed, 21 May 2025 16:04:39 -0400 Subject: [PATCH 1/2] Remove `collect` helper method from `ListIterator`/`ListStream` --- src/obspec/_list.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/obspec/_list.py b/src/obspec/_list.py index fc81021..772e740 100644 --- a/src/obspec/_list.py +++ b/src/obspec/_list.py @@ -49,14 +49,6 @@ def __iter__(self) -> Self: """Return `Self` as an async iterator.""" ... - def collect(self) -> ListChunkType_co: - """Collect all remaining ObjectMeta objects in the stream. - - This ignores the `chunk_size` parameter from the `list` call and collects all - remaining data into a single chunk. - """ - ... - def __next__(self) -> ListChunkType_co: """Return the next chunk of ObjectMeta in the stream.""" ... @@ -69,14 +61,6 @@ def __aiter__(self) -> Self: """Return `Self` as an async iterator.""" ... - async def collect_async(self) -> ListChunkType_co: - """Collect all remaining ObjectMeta objects in the stream. - - This ignores the `chunk_size` parameter from the `list` call and collects all - remaining data into a single chunk. - """ - ... - async def __anext__(self) -> ListChunkType_co: """Return the next chunk of ObjectMeta in the stream.""" ... From e892f93a08e736689f55928d9fcc36473ea63dc0 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Wed, 21 May 2025 16:06:10 -0400 Subject: [PATCH 2/2] fix docstring --- src/obspec/_list.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/obspec/_list.py b/src/obspec/_list.py index 772e740..dc53c31 100644 --- a/src/obspec/_list.py +++ b/src/obspec/_list.py @@ -111,7 +111,7 @@ def list( location greater than `offset`. Defaults to `None`. chunk_size: The number of items to collect per chunk in the returned (async) iterator. All chunks except for the last one will have this many - items. This is ignored in [`collect`][obspec.ListIterator.collect]. + items. Returns: A ListStream, which you can iterate through to access list results. @@ -159,8 +159,7 @@ def list_async( location greater than `offset`. Defaults to `None`. chunk_size: The number of items to collect per chunk in the returned (async) iterator. All chunks except for the last one will have this many - items. This is ignored in - [`collect_async`][obspec.ListStream.collect_async]. + items. Returns: A ListStream, which you can iterate through to access list results.