Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Show class init and call tooltips in notebook #1096

Merged
merged 1 commit into from

2 participants

@bfroehle

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

@bfroehle

This should fix issue #1094.

@bfroehle bfroehle closed this
@bfroehle bfroehle reopened this
@fperez fperez merged commit 9a36fc8 into ipython:master
@fperez 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. @bfroehle
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
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;
Something went wrong with that request. Please try again.