Skip to content

Commit 8e40792

Browse files
committed
make latex build succeed
1 parent e544baa commit 8e40792

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jupyter_sphinx/execute.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ class JupyterWidgetViewNode(docutils.nodes.Element):
201201
outputs this doctree node is rendered generically.
202202
"""
203203

204-
def __init__(self, view_spec):
205-
super().__init__('', view_spec=view_spec)
204+
def __init__(self, rawsource='', *children, **attributes):
205+
super().__init__('', view_spec=attributes['view_spec'])
206206

207207
def html(self):
208208
return ipywidgets.embed.widget_view_template.format(
@@ -223,8 +223,8 @@ class JupyterWidgetStateNode(docutils.nodes.Element):
223223
from all script tags on the page of the correct mimetype.
224224
"""
225225

226-
def __init__(self, state):
227-
super().__init__('', state=state)
226+
def __init__(self, rawsource='', *children, **attributes):
227+
super().__init__('', state=attributes['state'])
228228

229229
def html(self):
230230
# TODO: render into a separate file if 'html-manager' starts fully
@@ -323,7 +323,7 @@ def apply(self):
323323
attach_outputs(output_nodes, node)
324324

325325
if contains_widgets(notebook):
326-
doctree.append(JupyterWidgetStateNode(get_widgets(notebook)))
326+
doctree.append(JupyterWidgetStateNode(state=get_widgets(notebook)))
327327

328328

329329
### Roles
@@ -448,7 +448,7 @@ def cell_output_to_nodes(cell, data_priority, dir):
448448
format='html',
449449
))
450450
elif mime_type == WIDGET_VIEW_MIMETYPE:
451-
to_add.append(JupyterWidgetViewNode(data))
451+
to_add.append(JupyterWidgetViewNode(view_spec=data))
452452

453453
return to_add
454454

0 commit comments

Comments
 (0)