File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -425,7 +425,7 @@ def ancestor_right_before_timestamp(
425
425
current_snapshot : Optional [Snapshot ], table_metadata : TableMetadata , timestamp_ms : int
426
426
) -> Optional [Snapshot ]:
427
427
"""Get the ancestor right before the given timestamp."""
428
- if current_snapshot is not None :
428
+ if current_snapshot :
429
429
for ancestor in ancestors_of (current_snapshot , table_metadata ):
430
430
if ancestor .timestamp_ms < timestamp_ms :
431
431
return ancestor
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def test_manage_snapshots_context_manager(catalog: Catalog) -> None:
53
53
with tbl .manage_snapshots () as ms :
54
54
ms .create_tag (snapshot_id = current_snapshot_id , tag_name = "testing" )
55
55
ms .set_current_snapshot (snapshot_id = expected_snapshot_id )
56
- ms .create_tag (snapshot_id = expected_snapshot_id , tag_name = "testing2" )
56
+ ms .create_branch (snapshot_id = expected_snapshot_id , branch_name = "testing2" )
57
57
assert tbl .current_snapshot ().snapshot_id is not current_snapshot_id # type: ignore
58
58
assert tbl .metadata .refs ["testing" ].snapshot_id == current_snapshot_id
59
59
assert tbl .metadata .refs ["main" ] == SnapshotRef (snapshot_id = expected_snapshot_id , snapshot_ref_type = "branch" )
You can’t perform that action at this time.
0 commit comments