1
0
forked from VimPlug/jedi

Add py__doc__ as a better approach to docstrings.

This commit is contained in:
Dave Halter
2017-04-20 09:45:12 +02:00
parent b4631d6dd4
commit 7ca62578e1
6 changed files with 56 additions and 38 deletions

View File

@@ -94,8 +94,7 @@ class CompiledObject(Context):
def is_class(self):
return inspect.isclass(self.obj)
@property
def doc(self):
def py__doc__(self, include_call_signature=False):
return inspect.getdoc(self.obj) or ''
@property
@@ -129,10 +128,11 @@ class CompiledObject(Context):
@underscore_memoization
def _parse_function_doc(self):
if self.doc is None:
doc = self.py__doc__()
if doc is None:
return '', ''
return _parse_function_doc(self.doc)
return _parse_function_doc(doc)
@property
def api_type(self):