Merge pull request #96 from RyanMillerC/fix-masked-edge-attrs

Verify Edge attributes exist before setting
pull/110/head
MinJae Kwon 6 years ago committed by GitHub
commit cff498eefa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -436,10 +436,13 @@ class Edge:
for k, v in self._default_edge_attrs.items(): for k, v in self._default_edge_attrs.items():
self._attrs[k] = v self._attrs[k] = v
# Graphviz complaining about using label for edges, so replace it with xlabel. if label:
self._attrs["xlabel"] = label # Graphviz complaining about using label for edges, so replace it with xlabel.
self._attrs["color"] = color self._attrs["xlabel"] = label
self._attrs["style"] = style if color:
self._attrs["color"] = color
if style:
self._attrs["style"] = style
self._attrs.update(attrs) self._attrs.update(attrs)
def __sub__(self, other: Union["Node", "Edge", List["Node"]]): def __sub__(self, other: Union["Node", "Edge", List["Node"]]):

Loading…
Cancel
Save