|
|
|
@ -143,7 +143,7 @@ class Diagram:
|
|
|
|
|
setdiagram(None)
|
|
|
|
|
|
|
|
|
|
def _repr_png_(self):
|
|
|
|
|
return self.dot.pipe(format='png')
|
|
|
|
|
return self.dot.pipe(format="png")
|
|
|
|
|
|
|
|
|
|
def _validate_direction(self, direction: str) -> bool:
|
|
|
|
|
direction = direction.upper()
|
|
|
|
@ -403,7 +403,8 @@ class Edge:
|
|
|
|
|
"fontsize": "13",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def __init__(self,
|
|
|
|
|
def __init__(
|
|
|
|
|
self,
|
|
|
|
|
node: "Node" = None,
|
|
|
|
|
forward: bool = False,
|
|
|
|
|
reverse: bool = False,
|
|
|
|
@ -504,15 +505,14 @@ class Edge:
|
|
|
|
|
@property
|
|
|
|
|
def attrs(self) -> Dict:
|
|
|
|
|
if self.forward and self.reverse:
|
|
|
|
|
direction = 'both'
|
|
|
|
|
direction = "both"
|
|
|
|
|
elif self.forward:
|
|
|
|
|
direction = 'forward'
|
|
|
|
|
direction = "forward"
|
|
|
|
|
elif self.reverse:
|
|
|
|
|
direction = 'back'
|
|
|
|
|
direction = "back"
|
|
|
|
|
else:
|
|
|
|
|
direction = 'none'
|
|
|
|
|
|
|
|
|
|
return {**self._attrs, 'dir': direction}
|
|
|
|
|
direction = "none"
|
|
|
|
|
return {**self._attrs, "dir": direction}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Group = Cluster
|
|
|
|
|