Skip to content

Commit 312e87a

Browse files
committed
temp [ci skip]
1 parent d3839b3 commit 312e87a

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

sqlmesh/core/context.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,19 +1078,11 @@ def format(
10781078
) -> bool:
10791079
"""Format all SQL models and audits."""
10801080
filtered_targets = [
1081-
target
1082-
for target in chain(self._models.values(), self._audits.values())
1083-
if target._path is not None
1084-
and target._path.suffix == ".sql"
1081+
target for target in self._models.values() | self._audits.values()
1082+
if target._path is not None and target._path.suffix == ".sql"
10851083
and (not paths or any(target._path.samefile(p) for p in paths))
10861084
]
1087-
unformatted_file_paths = []
1088-
10891085
for target in filtered_targets:
1090-
if (
1091-
target._path is None
1092-
): # introduced to satisfy type checker as still want to pull filter out as many targets as possible before loop
1093-
continue
10941086
with open(target._path, "r+", encoding="utf-8") as file:
10951087
before = file.read()
10961088
expressions = parse(before, default_dialect=self.config_for_node(target).dialect)

0 commit comments

Comments
 (0)