Show More
@@ -76,7 +76,6 b' import os' | |||
|
76 | 76 | import re |
|
77 | 77 | import shlex |
|
78 | 78 | import sys |
|
79 | import StringIO | |
|
80 | 79 | |
|
81 | 80 | from IPython.config.configurable import Configurable |
|
82 | 81 | from IPython.core.error import TryNext |
@@ -672,7 +671,7 b' class IPCompleter(Completer):' | |||
|
672 | 671 | return matches |
|
673 | 672 | |
|
674 | 673 | def _default_arguments_from_docstring(self, doc): |
|
675 | """Parse first line of docstring for call signature. | |
|
674 | """Parse the first line of docstring for call signature. | |
|
676 | 675 | |
|
677 | 676 | Docstring should be of the form 'min(iterable[, key=func])\n'. |
|
678 | 677 | It can also parse cython docstring of the form |
@@ -680,10 +679,10 b' class IPCompleter(Completer):' | |||
|
680 | 679 | """ |
|
681 | 680 | if doc is None: |
|
682 | 681 | return [] |
|
683 | sio = StringIO.StringIO(doc.lstrip()) | |
|
682 | ||
|
684 | 683 | #care only the firstline |
|
685 | #docstring can be long | |
|
686 | line = sio.readline() | |
|
684 | line = doc.lstrip().splitlines()[0] | |
|
685 | ||
|
687 | 686 | #p = re.compile(r'^[\w|\s.]+\(([^)]*)\).*') |
|
688 | 687 | #'min(iterable[, key=func])\n' -> 'iterable[, key=func]' |
|
689 | 688 | sig = self.docstring_sig_re.search(line) |
General Comments 0
You need to be logged in to leave comments.
Login now