Skip to content

Commit a54c570

Browse files
committed
update signature and check
1 parent 1df0f03 commit a54c570

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pyiceberg/table/snapshots.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,10 @@ def __eq__(self, other: Any) -> bool:
232232

233233

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

242240

243241
class Snapshot(IcebergBaseModel):
@@ -261,7 +259,9 @@ def __str__(self) -> str:
261259

262260
def manifests(self, io: FileIO) -> List[ManifestFile]:
263261
"""Return the manifests for the given snapshot."""
264-
return _manifests(io, self.manifest_list)
262+
if self.manifest_list:
263+
return _manifests(io, self.manifest_list)
264+
return []
265265

266266

267267
class MetadataLogEntry(IcebergBaseModel):

0 commit comments

Comments
 (0)