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
|
@property
|
||||||
def doc(self):
|
def doc(self):
|
||||||
""" Returns the docstr, behaves like `Completion.doc`. """
|
""" 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:
|
try:
|
||||||
return str(self.definition.docstr)
|
return str(self.definition.docstr)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|||||||
Reference in New Issue
Block a user