File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,8 @@ def apply(self):
147
147
kernel_name = default_kernel
148
148
file_name = next (default_names )
149
149
150
+ # Add empty placeholder cells for non-executed nodes so nodes and cells can be zipped
151
+ # and the provided input/output can be inserted later
150
152
notebook = execute_cells (
151
153
kernel_name ,
152
154
[nbformat .v4 .new_code_cell (node .astext () if node ["execute" ] else "" ) for node in nodes ],
@@ -185,6 +187,7 @@ def apply(self):
185
187
"Cell printed to stderr:\n {}" .format (stderr [0 ]["text" ])
186
188
)
187
189
190
+ # Insert input/output into placeholders for non-executed cells
188
191
for node , cell in zip (nodes , notebook .cells ):
189
192
if not node ["execute" ]:
190
193
cell .source = node .children [0 ].astext ()
You can’t perform that action at this time.
0 commit comments