Skip to content

Commit

Permalink
IPython Console: Fix error when trying to grab signature from docstring
Browse files Browse the repository at this point in the history
Fixes #2341
  • Loading branch information
ccordoba12 committed May 31, 2015
1 parent 7792a7f commit d772998
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spyderlib/widgets/ipython.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ def get_signature(self, content):
if text:
text = ANSI_OR_SPECIAL_PATTERN.sub('', text)
line = self._control.get_current_line_to_cursor()
name = line[:-1].split('.')[-1]
name = line[:-1].split('(')[-1] # Take last token after a (
name = name.split('.')[-1] # Then take last token after a .
argspec = getargspecfromtext(text)
if argspec:
# This covers cases like np.abs, whose docstring is
Expand Down

0 comments on commit d772998

Please sign in to comment.