Skip to content

Commit

Permalink
feat: Added strict as a parameter (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdsoha authored Jan 8, 2023
1 parent 3af6f87 commit 570f644
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion diagrams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(
outformat: str = "png",
autolabel: bool = False,
show: bool = True,
strict: bool = False,
graph_attr: dict = {},
node_attr: dict = {},
edge_attr: dict = {},
Expand All @@ -102,14 +103,15 @@ def __init__(
:param graph_attr: Provide graph_attr dot config attributes.
:param node_attr: Provide node_attr dot config attributes.
:param edge_attr: Provide edge_attr dot config attributes.
:param strict: Rendering should merge multi-edges.
"""
self.name = name
if not name and not filename:
filename = "diagrams_image"
elif not filename:
filename = "_".join(self.name.split()).lower()
self.filename = filename
self.dot = Digraph(self.name, filename=self.filename)
self.dot = Digraph(self.name, filename=self.filename, strict=strict)

# Set attributes.
for k, v in self._default_graph_attrs.items():
Expand Down

0 comments on commit 570f644

Please sign in to comment.