From a54c57077185a8345b2c2537aa691e364f79caa9 Mon Sep 17 00:00:00 2001 From: chinmay-bhat <12948588+chinmay-bhat@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:58:02 +0530 Subject: [PATCH] update signature and check --- pyiceberg/table/snapshots.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyiceberg/table/snapshots.py b/pyiceberg/table/snapshots.py index aa72484dc9..980399a2ab 100644 --- a/pyiceberg/table/snapshots.py +++ b/pyiceberg/table/snapshots.py @@ -232,12 +232,10 @@ def __eq__(self, other: Any) -> bool: @lru_cache -def _manifests(io: FileIO, manifest_list: Optional[str]) -> List[ManifestFile]: +def _manifests(io: FileIO, manifest_list: 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 [] + file = io.new_input(manifest_list) + return list(read_manifest_list(file)) class Snapshot(IcebergBaseModel): @@ -261,7 +259,9 @@ def __str__(self) -> str: def manifests(self, io: FileIO) -> List[ManifestFile]: """Return the manifests for the given snapshot.""" - return _manifests(io, self.manifest_list) + if self.manifest_list: + return _manifests(io, self.manifest_list) + return [] class MetadataLogEntry(IcebergBaseModel):