diff --git a/docs/auto_examples/order_control_rich_model_machine.rst b/docs/auto_examples/order_control_rich_model_machine.rst index 3bfdb323..241d3c9d 100644 --- a/docs/auto_examples/order_control_rich_model_machine.rst +++ b/docs/auto_examples/order_control_rich_model_machine.rst @@ -214,7 +214,7 @@ Since there's still $6 left to fulfill the payment, we cannot process the order. .. code-block:: none - OrderControl(model=<__main__.Order object at 0x7f5730b462e0>, state_field='state', current_state='waiting_for_payment') + OrderControl(model=<__main__.Order object at 0x7fa3456ef2e0>, state_field='state', current_state='waiting_for_payment') @@ -258,7 +258,7 @@ Now paying the left amount, we can proceed. .. code-block:: none - OrderControl(model=<__main__.Order object at 0x7f5730b462e0>, state_field='state', current_state='processing') + OrderControl(model=<__main__.Order object at 0x7fa3456ef2e0>, state_field='state', current_state='processing') @@ -292,7 +292,7 @@ Now paying the left amount, we can proceed. .. code-block:: none - OrderControl(model=<__main__.Order object at 0x7f5730b462e0>, state_field='state', current_state='shipping') + OrderControl(model=<__main__.Order object at 0x7fa3456ef2e0>, state_field='state', current_state='shipping') @@ -391,7 +391,7 @@ Just checking the final expected state .. code-block:: none - OrderControl(model=<__main__.Order object at 0x7f5730b462e0>, state_field='state', current_state='completed') + OrderControl(model=<__main__.Order object at 0x7fa3456ef2e0>, state_field='state', current_state='completed') diff --git a/docs/examples/patch_repr_svg.py b/docs/examples/patch_repr_svg.py index 2753b6bd..3a24d5f1 100644 --- a/docs/examples/patch_repr_svg.py +++ b/docs/examples/patch_repr_svg.py @@ -1,17 +1,15 @@ import sys -def patch__repr_svg_(): # pragma: no cover +def patch__repr_html_(): # pragma: no cover """ You're running this example directly from your browser! By using the amazing https://pyodide.org/. Since we're in a browser, the default dependency of GraphViz installed locally don't work. So - this cell is an option to see our examples and try the library on the fly without the need to - install anything. - - We've to patch `StateMachine._repr_svg_` to retrieve the svg diagram online as the graphviz is - not available. + as an option to see our examples and try the library on the fly without the need to + install anything we'll patch `StateMachine._repr_html_` to retrieve the svg diagram online as + the graphviz is not available. This method will serialize and request the graph to an external service: https://quickchart.io. By using de diagrams support you trust quickchart.io. Please read @@ -28,11 +26,11 @@ def show_sm(sm): ) return ''.format(url) - StateMachine._repr_svg_ = show_sm + StateMachine._repr_html_ = show_sm if sys.platform == "emscripten": # pragma: no cover # https://pyodide.org/ is the runtime! - patch__repr_svg_() - print(patch__repr_svg_.__doc__) - print("'StateMachine._repr_svg_' patched!") + patch__repr_html_() + print(patch__repr_html_.__doc__) + print("'StateMachine._repr_html_' patched!")