We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 233d25f commit f9746c1Copy full SHA for f9746c1
1 file changed
statemachine/statemachine.py
@@ -98,9 +98,11 @@ def _repr_html_(self):
98
return '<div class="statemachine">{}</div>'.format(self._repr_svg_())
99
100
def _repr_svg_(self):
101
- from .contrib.diagram import DotGraphMachine
+ return self._graph().create_svg().decode()
102
103
- return DotGraphMachine(self).get_graph().create_svg().decode()
+ def _graph(self):
104
+ from .contrib.diagram import DotGraphMachine
105
+ return DotGraphMachine(self).get_graph()
106
107
@property
108
def current_state_value(self):
0 commit comments