Skip to content

Commit

Permalink
Use a tuple for history
Browse files Browse the repository at this point in the history
  • Loading branch information
Golf Player committed Jun 1, 2020
1 parent e5928c0 commit 8440dbf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nbclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def __init__(self, nb, km=None, **kw):
}

def _update_state(self, new_state):
self.state_history.append([new_state, timestamp()])
self.state_history.append((new_state, timestamp()))

def reset_execution_trackers(self):
"""Resets any per-execution trackers.
Expand All @@ -323,7 +323,8 @@ def reset_execution_trackers(self):
self.output_hook_stack = collections.defaultdict(list)
# our front-end mimicing Output widgets
self.comm_objects = {}
self.state_history = [ExecutionState.IDLE, timestamp()]
self.state_history = []
self._update_state(ExecutionState.IDLE)
self.current_cell = None
self.current_cell_index = -1

Expand Down

0 comments on commit 8440dbf

Please sign in to comment.