Skip to content

Commit 845075c

Browse files
committed
fixes bug where packages in a virtual env are considered serializable
1 parent a6d121e commit 845075c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

examples/wursthall/macros/macros.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from sqlglot import expressions as exp
1+
from sqlglot import exp
22

33
from sqlmesh.core.macros import MacroEvaluator, macro
44

sqlmesh/cli/example_project.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
DEFAULT_CONFIG = """connections:
88
local:
99
type: duckdb
10-
database: db.duckdb
10+
database: db.db
1111
1212
default_connection: local
1313
"""

sqlmesh/utils/metaprogramming.py

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ def _is_relative_to(path: t.Optional[Path | str], other: t.Optional[Path | str])
3333
if isinstance(other, str):
3434
other = Path(other)
3535

36+
if "site-packages" in str(path):
37+
return False
38+
3639
try:
3740
path.absolute().relative_to(other.absolute())
3841
return True

0 commit comments

Comments
 (0)