From a42568a315463d68ba5266c47d45f3df9c4b84ed Mon Sep 17 00:00:00 2001 From: Jayce Date: Sat, 3 Jan 2026 13:31:13 -0500 Subject: [PATCH] chore: Use `SnapshotRefType` Enum instead of hard-coded strings --- pyiceberg/table/update/snapshot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyiceberg/table/update/snapshot.py b/pyiceberg/table/update/snapshot.py index e89cd45d34..84298e08c3 100644 --- a/pyiceberg/table/update/snapshot.py +++ b/pyiceberg/table/update/snapshot.py @@ -880,7 +880,7 @@ def create_tag(self, snapshot_id: int, tag_name: str, max_ref_age_ms: int | None update, requirement = self._transaction._set_ref_snapshot( snapshot_id=snapshot_id, ref_name=tag_name, - type="tag", + type=SnapshotRefType.TAG, max_ref_age_ms=max_ref_age_ms, ) self._updates += update @@ -921,7 +921,7 @@ def create_branch( update, requirement = self._transaction._set_ref_snapshot( snapshot_id=snapshot_id, ref_name=branch_name, - type="branch", + type=SnapshotRefType.BRANCH, max_ref_age_ms=max_ref_age_ms, max_snapshot_age_ms=max_snapshot_age_ms, min_snapshots_to_keep=min_snapshots_to_keep,