Skip to content

Commit 525a14f

Browse files
committed
Tell the kernel not to save executed cells to history
This avoids polluting the input history for any interactive frontends that use Jupyter (e.g. ipython).
1 parent f48c660 commit 525a14f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nbval/kernel.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,12 @@ def execute_cell_input(self, cell_input, allow_stdin=None):
145145
logger.debug('Executing cell: "%s"...', cell_input.splitlines()[0][:40])
146146
else:
147147
logger.debug('Executing empty cell')
148-
return self.kc.execute(cell_input, allow_stdin=allow_stdin, stop_on_error=False)
148+
return self.kc.execute(
149+
cell_input,
150+
store_history=False,
151+
allow_stdin=allow_stdin,
152+
stop_on_error=False,
153+
)
149154

150155
def await_reply(self, msg_id, timeout=None):
151156
"""

0 commit comments

Comments
 (0)