@@ -634,11 +634,10 @@ def __init__(self, items: list[dict[str, int]], count: int) -> None:
634634
635635
636636class _FakeCursorPage :
637- """Cursor-paginated page whose `count` (items scanned) may exceed `len(items)` when filters drop items."""
637+ """Cursor-paginated page mirroring `ListOfRequests`: no scanned-`count`, so a filtered page is just ` items=[]` ."""
638638
639- def __init__ (self , items : list [dict [str , int ]], count : int , next_cursor : str | None ) -> None :
639+ def __init__ (self , items : list [dict [str , int ]], next_cursor : str | None ) -> None :
640640 self .items = items
641- self .count = count
642641 self .next_cursor = next_cursor
643642
644643
@@ -669,10 +668,10 @@ async def _callback(*, limit: int | None = None, offset: int | None = None) -> _
669668
670669
671670def test_cursor_iterator_continues_past_fully_filtered_page () -> None :
672- """A fully-filtered page (`items=[]`, `count>0` ) with a live cursor must not stop the cursor iterator."""
671+ """A fully-filtered page (`items=[]`) with a live cursor must not stop the cursor iterator."""
673672 pages = {
674- None : _FakeCursorPage (items = [], count = 1000 , next_cursor = 'c1' ),
675- 'c1' : _FakeCursorPage (items = [{'id' : 1 }, {'id' : 2 }], count = 2 , next_cursor = None ),
673+ None : _FakeCursorPage (items = [], next_cursor = 'c1' ),
674+ 'c1' : _FakeCursorPage (items = [{'id' : 1 }, {'id' : 2 }], next_cursor = None ),
676675 }
677676
678677 def _callback (* , limit : int | None = None , cursor : str | None = None ) -> _FakeCursorPage : # noqa: ARG001
@@ -682,10 +681,10 @@ def _callback(*, limit: int | None = None, cursor: str | None = None) -> _FakeCu
682681
683682
684683async def test_cursor_iterator_async_continues_past_fully_filtered_page () -> None :
685- """A fully-filtered page (`items=[]`, `count>0` ) with a live cursor must not stop the async cursor iterator."""
684+ """A fully-filtered page (`items=[]`) with a live cursor must not stop the async cursor iterator."""
686685 pages = {
687- None : _FakeCursorPage (items = [], count = 1000 , next_cursor = 'c1' ),
688- 'c1' : _FakeCursorPage (items = [{'id' : 1 }, {'id' : 2 }], count = 2 , next_cursor = None ),
686+ None : _FakeCursorPage (items = [], next_cursor = 'c1' ),
687+ 'c1' : _FakeCursorPage (items = [{'id' : 1 }, {'id' : 2 }], next_cursor = None ),
689688 }
690689
691690 async def _callback (* , limit : int | None = None , cursor : str | None = None ) -> _FakeCursorPage : # noqa: ARG001
0 commit comments