Skip to content

Commit

Permalink
move requirements loading to load
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymao committed Oct 30, 2024
1 parent 7fe4804 commit 067824f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sqlmesh/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ def __init__(
loader=(loader or config.loader)(**config.loader_kwargs), configs={}
)
self._loaders[project_type].configs[path] = config
self._load_requirements(path)

self.project_type = c.HYBRID if len(self._loaders) > 1 else project_type
self._all_dialects: t.Set[str] = {self.config.dialect or ""}
Expand Down Expand Up @@ -537,6 +536,8 @@ def load(self, update_schemas: bool = True) -> GenericContext[C]:

projects = []
for context_loader in self._loaders.values():
for path in context_loader.configs:
self._load_requirements(path)
with sys_path(*context_loader.configs):
projects.append(context_loader.loader.load(self, update_schemas))

Expand Down

0 comments on commit 067824f

Please sign in to comment.