From 5c76b2043497960be42cd8218ad33b15461396e9 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sat, 3 Nov 2012 23:52:37 +0100 Subject: [PATCH] Add call signature to Completion.doc --- jedi/api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jedi/api.py b/jedi/api.py index 0734b28a..977ad601 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -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 ''