Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Nov 22, 2022
1 parent 1385831 commit 5933bd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion joeflow/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def get_graph(cls, color="black"):
graph.attr("graph", rankdir="LR")
graph.attr(
"node",
dict(
_attributes=dict(
fontname="sans-serif", shape="rect", style="filled", fillcolor="white"
),
)
Expand Down
6 changes: 3 additions & 3 deletions joeflow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ def __iter__(self, subgraph=False):
for kw in ("graph", "node", "edge"):
attrs = getattr(self, "%s_attr" % kw)
if attrs:
yield self._attr(kw, self._attr_list(None, attrs))
yield self._attr(kw, self._attr_list(None, kwargs=attrs))

yield from self.body

for name, attrs in sorted(self._nodes.items()):
name = self._quote(name)
label = attrs.pop("label", None)
_attributes = attrs.pop("_attributes", None)
attr_list = self._attr_list(label, attrs, _attributes)
attr_list = self._attr_list(label, kwargs=attrs, attributes=_attributes)
yield self._node(name, attr_list)

for edge, attrs in sorted(self._edges.items()):
Expand All @@ -52,7 +52,7 @@ def __iter__(self, subgraph=False):
head_name = self._quote_edge(head_name)
label = attrs.pop("label", None)
_attributes = attrs.pop("_attributes", None)
attr_list = self._attr_list(label, attrs, _attributes)
attr_list = self._attr_list(label, kwargs=attrs, attributes=_attributes)
yield self._edge(tail=tail_name, head=head_name, attr=attr_list)

yield self._tail
Expand Down

0 comments on commit 5933bd1

Please sign in to comment.