Skip to content

Commit 6dbb7ed

Browse files
committed
style: apply ruff fixes and formatting
Signed-off-by: Pavan-Rana <psrbr157@gmail.com>
1 parent 2c0ee49 commit 6dbb7ed

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

sqlmesh/utils/cache.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def __init__(self, path: Path, prefix: t.Optional[str] = None):
6565

6666
try:
6767
stat_result = file.stat()
68-
if not file.stem.startswith(self._cache_version) or stat_result.st_atime < threshold:
68+
if (
69+
not file.stem.startswith(self._cache_version)
70+
or stat_result.st_atime < threshold
71+
):
6972
file.unlink(missing_ok=True)
7073
except FileNotFoundError:
7174
# File was deleted between glob() and stat() — skip stale cache entries gracefully

tests/utils/test_cache.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import os
2-
import time
31
import typing as t
42
from pathlib import Path
53

@@ -151,4 +149,3 @@ def flaky_stat(self, **kwargs):
151149
mocker.patch.object(Path, "stat", flaky_stat)
152150

153151
FileCache(tmp_path)
154-

0 commit comments

Comments
 (0)