1010from sphinx .util .fileutil import copy_asset
1111
1212from ._version import __version__
13- from .ast import (WIDGET_VIEW_MIMETYPE , CellInput , CellInputNode , CellOutput ,
14- CellOutputNode , CombineCellInputOutput , JupyterCell ,
15- JupyterCellNode , JupyterDownloadRole , JupyterKernelNode ,
16- JupyterWidgetStateNode , JupyterWidgetViewNode ,
17- MimeBundleNode )
13+ from .ast import (
14+ WIDGET_VIEW_MIMETYPE ,
15+ CellInput ,
16+ CellInputNode ,
17+ CellOutput ,
18+ CellOutputNode ,
19+ CombineCellInputOutput ,
20+ JupyterCell ,
21+ JupyterCellNode ,
22+ JupyterDownloadRole ,
23+ JupyterKernelNode ,
24+ JupyterWidgetStateNode ,
25+ JupyterWidgetViewNode ,
26+ MimeBundleNode ,
27+ )
1828from .execute import ExecuteJupyterCells , JupyterKernel
19- from .thebelab import (ThebeButton , ThebeButtonNode , ThebeOutputNode ,
20- ThebeSourceNode )
29+ from .thebelab import ThebeButton , ThebeButtonNode , ThebeOutputNode , ThebeSourceNode
2130
2231REQUIRE_URL_DEFAULT = (
2332 "https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"
2635
2736logger = logging .getLogger (__name__ )
2837
29- ##############################################################################
3038# Constants and functions we'll use later
3139
3240# Used for nodes that do not need to be rendered
41+
42+
3343def skip (self , node ):
3444 raise docutils .nodes .SkipNode
3545
@@ -48,6 +58,7 @@ def halt(self, node):
4858 lambda self , node : self .depart_container (node ),
4959)
5060
61+
5162# Used to render the container and its children as HTML
5263def visit_container_html (self , node ):
5364 self .body .append (node .visit_html ())
@@ -78,7 +89,7 @@ def visit_thebe_source(self, node):
7889 lambda self , node : self .depart_container (node ),
7990)
8091
81- ##############################################################################
92+
8293# Sphinx callback functions
8394def builder_inited (app ):
8495 """
0 commit comments