mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Merge pull request #1096 from bfroehle/1094
Show constructor docstrings in notebook tooltip. Closes #1094.
This commit is contained in:
commit
31ecae535b
@ -162,9 +162,16 @@ var IPython = (function (IPython) {
|
||||
}
|
||||
|
||||
CodeCell.prototype.finish_tooltip = function (reply) {
|
||||
defstring=reply.definition;
|
||||
docstring=reply.docstring;
|
||||
if(docstring == null){docstring="<empty docstring>"};
|
||||
// Extract call tip data; the priority is call, init, main.
|
||||
defstring = reply.call_def;
|
||||
if (defstring == null) { defstring = reply.init_definition; }
|
||||
if (defstring == null) { defstring = reply.definition; }
|
||||
|
||||
docstring = reply.call_docstring;
|
||||
if (docstring == null) { docstring = reply.init_docstring; }
|
||||
if (docstring == null) { docstring = reply.docstring; }
|
||||
if (docstring == null) { docstring = "<empty docstring>"; }
|
||||
|
||||
name=reply.name;
|
||||
|
||||
var that = this;
|
||||
|
Loading…
Reference in New Issue
Block a user