forked from VimPlug/jedi
improve docstring hinting, also matters for sqlite3
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
import evaluate
|
import evaluate
|
||||||
|
import parsing
|
||||||
|
|
||||||
|
|
||||||
#@cache.memoize_default() # TODO add
|
#@cache.memoize_default() # TODO add
|
||||||
@@ -12,9 +13,9 @@ def follow_param(param):
|
|||||||
param_str = search_param_in_docstr(func.docstr, str(param.get_name()))
|
param_str = search_param_in_docstr(func.docstr, str(param.get_name()))
|
||||||
|
|
||||||
if param_str is not None:
|
if param_str is not None:
|
||||||
scope = func.get_parent_until()
|
p = parsing.PyFuzzyParser(param_str, None, (1, 0), no_docstr=True)
|
||||||
return evaluate.get_scopes_for_name(scope, param_str,
|
p.user_stmt.parent = func
|
||||||
search_global=True)
|
return evaluate.follow_statement(p.user_stmt)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user