Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Show class init and call tooltips in notebook.

Closes #1094.
commit c6bcbb58982e519b446b363a4a73b0e750ad5d39 1 parent c8874d7
@bfroehle authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 IPython/frontend/html/notebook/static/js/codecell.js
View
13 IPython/frontend/html/notebook/static/js/codecell.js
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.