Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save widgets after execute #779

Closed
wants to merge 6 commits into from

#751 handling widget metadata without model_name

  • Loading branch information
lmitusinski committed Mar 15, 2018
commit a301aa4e69ad89bab0c025b18367ccd186ddde90
@@ -286,7 +286,7 @@ def start_new_kernel(startup_timeout=60, kernel_name='python', **kwargs):
'application/vnd.jupyter.widget-state+json': {
'state': {
model_id: _serialize_widget_state(state)
for model_id, state in self.widget_state.items()
for model_id, state in self.widget_state.items() if '_model_name' in state
},
'version_major': 2,
'version_minor': 0,
@@ -486,8 +486,8 @@ def _serialize_widget_state(state):
TODO: Does not currently split binary buffers or remove default values.
"""
return {
'model_name': state['_model_name'],
'model_module': state['_model_module'],
'model_name': state.get('_model_name'),
'model_module': state.get('_model_module'),
'model_module_version': state.get('_model_module_version'),
'state': state,
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.