Skip to content

Commit 81ab4dd

Browse files
authored
add missing import (#823)
1 parent 37cffef commit 81ab4dd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sqlmesh/core/context.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ def render_dag(self, path: str, format: str = "jpeg") -> str:
729729
format: The desired format to use when rending the dag
730730
"""
731731
graph = self.get_dag(format=format)
732+
# We know graphviz is installed because the command above would have failed if it was not. This allows
733+
# us to then catch the specific error that occurs when the system install is missing.
734+
import graphviz # type: ignore
732735

733736
try:
734737
return graph.render(path, format=format)

0 commit comments

Comments
 (0)