Skip to content

Commit

Permalink
update signature and check
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmay-bhat committed Sep 10, 2024
1 parent 1df0f03 commit a54c570
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyiceberg/table/snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit a54c570

Please sign in to comment.