Skip to content

Commit a42568a

Browse files
committed
chore: Use SnapshotRefType Enum instead of hard-coded strings
1 parent 1b69a25 commit a42568a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyiceberg/table/update/snapshot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ def create_tag(self, snapshot_id: int, tag_name: str, max_ref_age_ms: int | None
880880
update, requirement = self._transaction._set_ref_snapshot(
881881
snapshot_id=snapshot_id,
882882
ref_name=tag_name,
883-
type="tag",
883+
type=SnapshotRefType.TAG,
884884
max_ref_age_ms=max_ref_age_ms,
885885
)
886886
self._updates += update
@@ -921,7 +921,7 @@ def create_branch(
921921
update, requirement = self._transaction._set_ref_snapshot(
922922
snapshot_id=snapshot_id,
923923
ref_name=branch_name,
924-
type="branch",
924+
type=SnapshotRefType.BRANCH,
925925
max_ref_age_ms=max_ref_age_ms,
926926
max_snapshot_age_ms=max_snapshot_age_ms,
927927
min_snapshots_to_keep=min_snapshots_to_keep,

0 commit comments

Comments
 (0)