Skip to content

Commit

Permalink
fix(graphviz): switch engines and renderers
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Jan 30, 2023
1 parent fd14e9a commit 98396c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arguebuf/converters/to_graphviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import typing as t
from pathlib import Path

from graphviz import FORMATS, RENDERERS, Digraph
from graphviz import ENGINES, FORMATS, Digraph

from arguebuf.models.edge import Edge
from arguebuf.models.graph import Graph
Expand Down Expand Up @@ -175,9 +175,9 @@ def render(
f"You need to provide a path with a file ending supported by graphviz: {FORMATS}"
)

if prog not in RENDERERS:
if prog not in ENGINES:
raise ValueError(
f"You need to provide a prog that is supported by graphviz: {RENDERERS}"
f"You need to provide a prog that is supported by graphviz: {ENGINES}"
)

if isinstance(graph, Graph):
Expand All @@ -186,6 +186,6 @@ def render(
"Please use 'arguebuf.to_graphviz(graph)' to convert your argument graph to the 'DOT' format."
)
elif isinstance(graph, Digraph):
graph.render(outfile=path, renderer=prog)
graph.render(outfile=path, engine=prog)
else:
graph.draw(path=path, prog=prog)

0 comments on commit 98396c8

Please sign in to comment.