1
0
forked from VimPlug/jedi

docstrings of builtins can be non-standard, fixes #298

This commit is contained in:
David Halter
2013-08-26 20:21:03 +04:30
parent 8cefc8d49b
commit 345ba0d3c2

View File

@@ -374,7 +374,7 @@ def _parse_function_doc(func):
change_options, param_str)
if changes == 0:
break
except (ValueError, AttributeError):
except (ValueError, AttributeError, UnboundLocalError):
debug.dbg('no brackets found - no param')
end = 0
param_str = ''
@@ -384,7 +384,7 @@ def _parse_function_doc(func):
if doc is not None:
r = re.search('-[>-]* ', doc[end:end + 7])
if doc is None or r is None:
ret = 'pass'
ret = 'pass' if doc is None else ''
else:
index = end + r.end()
# get result type, which can contain newlines