Fokko commented on code in PR #787: URL: https://github.com/apache/iceberg-python/pull/787#discussion_r1632590946
########## pyiceberg/table/snapshots.py: ########## @@ -228,6 +229,15 @@ def __eq__(self, other: Any) -> bool: ) +@lru_cache +def _manifests(io: FileIO, manifest_list: Optional[str]) -> List[ManifestFile]: + """Return the manifests from the manifest list.""" + if manifest_list not in (None, ""): + file = io.new_input(manifest_list) # type: ignore + return list(read_manifest_list(file)) + return [] Review Comment: Maybe better to do this check around line 260, and change the signature to: ```suggestion def _manifests(io: FileIO, manifest_list: str) -> List[ManifestFile]: """Return the manifests from the manifest list.""" file = io.new_input(manifest_list) # type: ignore return list(read_manifest_list(file)) ``` Instead of `if manifest_list not in (None, ""):`, I think the more pythonic way is `if manifest_list:` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org