Skip to content

Commit 8440dbf

Browse files
author
Golf Player
committed
Use a tuple for history
1 parent e5928c0 commit 8440dbf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nbclient/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def __init__(self, nb, km=None, **kw):
309309
}
310310

311311
def _update_state(self, new_state):
312-
self.state_history.append([new_state, timestamp()])
312+
self.state_history.append((new_state, timestamp()))
313313

314314
def reset_execution_trackers(self):
315315
"""Resets any per-execution trackers.
@@ -323,7 +323,8 @@ def reset_execution_trackers(self):
323323
self.output_hook_stack = collections.defaultdict(list)
324324
# our front-end mimicing Output widgets
325325
self.comm_objects = {}
326-
self.state_history = [ExecutionState.IDLE, timestamp()]
326+
self.state_history = []
327+
self._update_state(ExecutionState.IDLE)
327328
self.current_cell = None
328329
self.current_cell_index = -1
329330

0 commit comments

Comments
 (0)