Skip to content

Commit

Permalink
Show class init and call tooltips in notebook.
Browse files Browse the repository at this point in the history
Closes #1094.
  • Loading branch information
bfroehle committed Dec 18, 2011
1 parent c8874d7 commit c6bcbb5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions IPython/frontend/html/notebook/static/js/codecell.js
Expand Up @@ -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;
Expand Down

0 comments on commit c6bcbb5

Please sign in to comment.