forked from VimPlug/jedi
Use Function.doc from api.Definition.doc
This commit is contained in:
@@ -135,6 +135,14 @@ class Definition(dynamic.BaseOutput):
|
||||
@property
|
||||
def doc(self):
|
||||
""" Returns the docstr, behaves like `Completion.doc`. """
|
||||
try:
|
||||
return self.definition.doc
|
||||
except AttributeError:
|
||||
return self.raw_doc
|
||||
|
||||
@property
|
||||
def raw_doc(self):
|
||||
""" Returns the docstring `__doc__` for any object """
|
||||
try:
|
||||
return str(self.definition.docstr)
|
||||
except AttributeError:
|
||||
|
||||
Reference in New Issue
Block a user