File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ def get_annotations(
421421 ):
422422 page_iter = fetch_all_pages (
423423 name = "get_annotations" ,
424- fetch_page = lambda * args , ** kwargs : self ._get_annotations ( * args , ** kwargs ) ,
424+ fetch_page = self ._get_annotations ,
425425 get_page = lambda response : response ["annotations" ],
426426 )
427427 annotations = []
@@ -474,9 +474,7 @@ def _get_annotations(
474474 def get_annotations_for_docs (self , doc_ids , endpoint = None ):
475475 page_iter = fetch_all_pages (
476476 name = "get_annotations_for_docs" ,
477- fetch_page = lambda * args , ** kwargs : self ._get_annotations_for_docs (
478- * args , ** kwargs
479- ),
477+ fetch_page = self ._get_annotations_for_docs ,
480478 get_page = lambda response : response ["annotations" ],
481479 )
482480 annotations = []
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ def fetch_all_pages(
99) -> Callable [..., Iterator [Any ]]:
1010 """Returns an iterator that calls fetch_page with an offset that we increment by the number of pages fetched. Stop if page returns empty list.
1111
12- :param fetch_page: the api call that takes an offset (zero-based) that fetches a page of results
12+ :param fetch_page: a function that makes an api call to fetch a page of results (using zero-based offset)
1313 :param get_page: a function that extracts the page from the response
1414 """
1515
You can’t perform that action at this time.
0 commit comments