Skip to content

Commit 885e9fa

Browse files
committed
style: format scoped snapshot cleanup changes
Signed-off-by: mday-io <mdaytn@gmail.com>
1 parent 5d70aa4 commit 885e9fa

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

sqlmesh/core/context.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3034,8 +3034,10 @@ def _run_janitor(
30343034
)
30353035
)
30363036
self.state_sync.compact_intervals()
3037-
elif ignore_ttl and target_snapshot_ids and not self.state_reader.get_environment(
3038-
environment
3037+
elif (
3038+
ignore_ttl
3039+
and target_snapshot_ids
3040+
and not self.state_reader.get_environment(environment)
30393041
):
30403042
self.console.log_warning(
30413043
"Scoped snapshot cleanup will permanently delete unreferenced physical snapshot "

tests/core/integration/test_aux_commands.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,9 @@ def test_invalidate_environment_cleanup_snapshots_warns_and_drops_physical_table
554554
)
555555
assert ctx.state_sync.get_environment("dev") is None
556556
assert not ctx.state_sync.get_snapshots(snapshot_ids)
557-
assert not any(ctx.engine_adapter.table_exists(table_name) for table_name in physical_table_names)
557+
assert not any(
558+
ctx.engine_adapter.table_exists(table_name) for table_name in physical_table_names
559+
)
558560

559561

560562
def test_janitor_environment_ignore_ttl_cleans_only_scoped_snapshots(

0 commit comments

Comments
 (0)