Fokko commented on code in PR #3454:
URL: https://github.com/apache/iceberg-python/pull/3454#discussion_r3360542913
##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -1051,26 +1052,24 @@ def list_tables(self, namespace: str | Identifier) ->
list[Identifier]:
raise ValueError(f"{PAGE_SIZE} must be a positive integer")
params["pageSize"] = str(page_size)
- tables: list[Identifier] = []
- page_token: str | None = None
-
- while True:
- if page_token:
- params["pageToken"] = page_token
+ def _fetch_page(page_token: str) -> tuple[list[Identifier], str |
None]:
Review Comment:
I see theis `tuple[list[T], str | None]` coming back multiple times, should
we introduce a
[`TypeAliasType`](https://docs.python.org/3/library/typing.html#typing.TypeAliasType)
to improve readability?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]