1
0
forked from VimPlug/jedi

Fix a namespace issue when getting references

This commit is contained in:
Dave Halter
2020-05-16 00:54:34 +02:00
parent 384b2ad014
commit 70aa7fc917

View File

@@ -128,7 +128,8 @@ def find_references(module_context, tree_name):
found_names_dct = _dictionarize(found_names) found_names_dct = _dictionarize(found_names)
module_contexts = set(d.get_root_context() for d in found_names) module_contexts = set(d.get_root_context() for d in found_names)
module_contexts = [module_context] + [m for m in module_contexts if m != module_context] module_contexts = [module_context] \
+ [m for m in module_contexts if m != module_context and m.tree_node is not None]
# For param no search for other modules is necessary. # For param no search for other modules is necessary.
if any(n.api_type == 'param' for n in found_names): if any(n.api_type == 'param' for n in found_names):
potential_modules = module_contexts potential_modules = module_contexts