forked from VimPlug/jedi
docstring parsing to infer argument types, fixes #40
This commit is contained in:
@@ -25,6 +25,7 @@ import builtin
|
||||
import imports
|
||||
import helpers
|
||||
import dynamic
|
||||
import docstrings
|
||||
|
||||
memoize_caches = []
|
||||
faked_scopes = []
|
||||
@@ -1064,6 +1065,12 @@ def get_scopes_for_name(scope, name_str, position=None, search_global=False,
|
||||
and r.position_nr > 0: # 0 would be self
|
||||
r = func.var.params[r.position_nr]
|
||||
|
||||
# add docstring knowledge
|
||||
doc_params = docstrings.follow_param(r)
|
||||
if doc_params:
|
||||
res_new += doc_params
|
||||
continue
|
||||
|
||||
if not r.is_generated:
|
||||
res_new += dynamic.search_params(r)
|
||||
if not r.assignment_details:
|
||||
|
||||
Reference in New Issue
Block a user