Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Show class init and call tooltips in notebook #1096

Merged
merged 1 commit into from

2 participants

Bradley M. Froehle Fernando Perez
Bradley M. Froehle
Collaborator

Just like in Qt console, this patch shows the docstring and definition of the first match among the call, constructor, and main methods.

Bradley M. Froehle
Collaborator

This should fix issue #1094.

Bradley M. Froehle bfroehle closed this
Bradley M. Froehle bfroehle reopened this
Fernando Perez fperez merged commit 9a36fc8 into from
Fernando Perez fperez referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 18, 2011
  1. Bradley M. Froehle
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 3 deletions.
  1. +10 −3 IPython/frontend/html/notebook/static/js/codecell.js
13 IPython/frontend/html/notebook/static/js/codecell.js
View
@@ -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;
Something went wrong with that request. Please try again.