Skip to content

Commit 58ba6b0

Browse files
committed
Fix mypy and pydocstyle lint errors in snapshot producer
Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
1 parent 4ce818b commit 58ba6b0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎pyiceberg/table/update/snapshot.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ def _resolve_parent_snapshot(self) -> Snapshot | None:
458458
def _resolve_starting_snapshot(self) -> Snapshot:
459459
"""Resolve starting snapshot for the conflict detection window."""
460460
starting_id = self._starting_snapshot_id if self._starting_snapshot_id is not None else self._parent_snapshot_id
461+
if starting_id is None:
462+
raise ValidationException("Cannot resolve starting snapshot: both starting and parent snapshot IDs are None")
461463
snapshot = self._transaction._table.metadata.snapshot_by_id(starting_id)
462464
if snapshot is None:
463465
raise ValidationException(f"Cannot find starting snapshot {starting_id} in table metadata")
@@ -616,7 +618,7 @@ def _refresh_for_retry(self) -> None:
616618

617619
class _FastAppendFiles(_SnapshotProducer["_FastAppendFiles"]):
618620
def _validate_concurrency(self) -> None:
619-
"""Appends do not conflict with other operations; skip validation."""
621+
"""Skip validation; appends do not conflict with other operations."""
620622

621623
def _existing_manifests(self) -> list[ManifestFile]:
622624
"""To determine if there are any existing manifest files.

0 commit comments

Comments
 (0)