Output for graphviz (.dot) files :rtype: str
(self)
| 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 | """ |
no test coverage detected