Skip to content

Commit 384526c

Browse files
committed
update signature and check
1 parent 3b9ac1b commit 384526c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pyiceberg/table/snapshots.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,10 @@ def __eq__(self, other: Any) -> bool:
230230

231231

232232
@lru_cache
233-
def _manifests(io: FileIO, manifest_list: Optional[str]) -> List[ManifestFile]:
233+
def _manifests(io: FileIO, manifest_list: str) -> List[ManifestFile]:
234234
"""Return the manifests from the manifest list."""
235-
if manifest_list not in (None, ""):
236-
file = io.new_input(manifest_list) # type: ignore
237-
return list(read_manifest_list(file))
238-
return []
235+
file = io.new_input(manifest_list)
236+
return list(read_manifest_list(file))
239237

240238

241239
class Snapshot(IcebergBaseModel):
@@ -259,7 +257,9 @@ def __str__(self) -> str:
259257

260258
def manifests(self, io: FileIO) -> List[ManifestFile]:
261259
"""Return the manifests for the given snapshot."""
262-
return _manifests(io, self.manifest_list)
260+
if self.manifest_list:
261+
return _manifests(io, self.manifest_list)
262+
return []
263263

264264

265265
class MetadataLogEntry(IcebergBaseModel):

0 commit comments

Comments
 (0)