Skip to content

Commit e5928c0

Browse files
author
Golf Player
committed
rename states to more sensible names; make idle not useless
1 parent 9cce4ad commit e5928c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nbclient/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def timestamp():
3434

3535

3636
class ExecutionState(enum.Enum):
37-
NOTHING = 0
38-
STARTUP = 1
37+
IDLE = 0
38+
STARTING_UP = 1
3939
STARTING_KERNEL_CLIENT = 2
4040
EXECUTING = 3
4141
CLEANING_UP = 4
@@ -323,7 +323,7 @@ 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 = []
326+
self.state_history = [ExecutionState.IDLE, timestamp()]
327327
self.current_cell = None
328328
self.current_cell_index = -1
329329

@@ -518,7 +518,7 @@ async def async_execute(self, reset_kc=False, **kwargs):
518518
if reset_kc and self.km:
519519
await self._async_cleanup_kernel()
520520
self.reset_execution_trackers()
521-
self._update_state(ExecutionState.STARTUP)
521+
self._update_state(ExecutionState.STARTING_UP)
522522

523523
async with self.async_setup_kernel(**kwargs):
524524
self._update_state(ExecutionState.EXECUTING)

0 commit comments

Comments
 (0)