forked from VimPlug/jedi
docstrings of builtins can be non-standard, fixes #298
This commit is contained in:
@@ -374,7 +374,7 @@ def _parse_function_doc(func):
|
|||||||
change_options, param_str)
|
change_options, param_str)
|
||||||
if changes == 0:
|
if changes == 0:
|
||||||
break
|
break
|
||||||
except (ValueError, AttributeError):
|
except (ValueError, AttributeError, UnboundLocalError):
|
||||||
debug.dbg('no brackets found - no param')
|
debug.dbg('no brackets found - no param')
|
||||||
end = 0
|
end = 0
|
||||||
param_str = ''
|
param_str = ''
|
||||||
@@ -384,7 +384,7 @@ def _parse_function_doc(func):
|
|||||||
if doc is not None:
|
if doc is not None:
|
||||||
r = re.search('-[>-]* ', doc[end:end + 7])
|
r = re.search('-[>-]* ', doc[end:end + 7])
|
||||||
if doc is None or r is None:
|
if doc is None or r is None:
|
||||||
ret = 'pass'
|
ret = 'pass' if doc is None else ''
|
||||||
else:
|
else:
|
||||||
index = end + r.end()
|
index = end + r.end()
|
||||||
# get result type, which can contain newlines
|
# get result type, which can contain newlines
|
||||||
|
|||||||
Reference in New Issue
Block a user