MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / to_dot

Method to_dot

code2flow/model.py:404–425  ·  view source on GitHub ↗

Output for graphviz (.dot) files :rtype: str

(self)

Source from the content-addressed store, hash-verified

402 assert isinstance(variable.points_to, (Node, Group))
403
404 def to_dot(self):
405 """
406 Output for graphviz (.dot) files
407 :rtype: str
408 """
409 attributes = {
410 'label': self.label(),
411 'name': self.name(),
412 'shape': "rect",
413 'style': 'rounded,filled',
414 'fillcolor': NODE_COLOR,
415 }
416 if self.is_trunk:
417 attributes['fillcolor'] = TRUNK_COLOR
418 elif self.is_leaf:
419 attributes['fillcolor'] = LEAF_COLOR
420
421 ret = self.uid + ' ['
422 for k, v in attributes.items():
423 ret += f'{k}="{v}" '
424 ret += ']'
425 return ret
426
427 def to_dict(self):
428 """

Callers 2

write_fileFunction · 0.45
to_dotMethod · 0.45

Calls 2

labelMethod · 0.95
nameMethod · 0.95

Tested by

no test coverage detected