1
0
forked from VimPlug/jedi

Add call signature to Completion.doc

This commit is contained in:
Takafumi Arakaki
2012-11-03 23:52:37 +01:00
parent 5f25f244ca
commit 5c76b20434

View File

@@ -72,9 +72,13 @@ class Completion(object):
@property
def doc(self):
""" Returns the docstring `__doc__` for any object """
""" Return a document string for this completion object. """
try:
return str(self.name.parent().docstr)
parent = self.name.parent()
docstr = str(parent.docstr)
if hasattr(parent, 'get_call_signature'):
docstr = parent.get_call_signature() + '\n\n' + docstr
return docstr
except AttributeError:
return ''