d490387c6f8b18242e57355d7f8f09ec18c980c5,bokeh/embed.py,,components,#Any#Any#Any#,52
Before Change
// 2) Do our rendering
with _ModelInDocument(models):
(docs_json, render_items) = _standalone_docs_json_and_render_items(models)
script = _script_for_render_items(docs_json, render_items, websocket_url=None, wrap_script=wrap_script)
After Change
existing_docs = set(m if isinstance(m, Document) else m.document for m in models)
existing_docs.discard(None)
if len(existing_docs) == 0:
// no existing docs, make a new one
doc = Document()
elif len(existing_docs) == 1:
// all existing docs are the same, use that one
doc = existing_docs.pop()
else:
// conflicting/multiple docs, raise an error
msg = ("Multiple items in models conatain documents or are "
"themselves documents. (Models must be owned by only a "
"single document). This may indicate a usage error.")
raise RuntimeError(msg)
models_to_dedoc = _add_doc_to_models(doc, models)
// 3) Do our rendering
(docs_json, render_items) = _standalone_docs_json_and_render_items(models)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: bokeh/bokeh
Commit Name: d490387c6f8b18242e57355d7f8f09ec18c980c5
Time: 2017-02-27
Author: jsignell@gmail.com
File Name: bokeh/embed.py
Class Name:
Method Name: components
Project Name: bokeh/bokeh
Commit Name: 8ade868885e90e0ffa49f2694f932dc1dcac7b3e
Time: 2018-08-24
Author: bryanv@anaconda.com
File Name: bokeh/embed/standalone.py
Class Name:
Method Name: autoload_static
Project Name: bokeh/bokeh
Commit Name: 65643839fcb8065e1ffc926c2295e380e4637e4a
Time: 2017-03-01
Author: jsignell@gmail.com
File Name: bokeh/io.py
Class Name:
Method Name: _save_helper