1
0
forked from VimPlug/jedi

Add a filter for global names.

This commit is contained in:
Dave Halter
2016-10-11 16:01:26 +02:00
parent 37ba971787
commit 5f46b48433
3 changed files with 72 additions and 35 deletions
+1 -1
View File
@@ -370,7 +370,7 @@ def _name_to_types(evaluator, name, scope):
elif typ.type == 'global_stmt':
for s in _get_global_stmt_scopes(evaluator, typ, name):
finder = NameFinder(evaluator, s, str(name))
names_dicts = finder.scopes(search_global=True)
names_dicts = finder.get_filters(search_global=True)
# For global_stmt lookups, we only need the first possible scope,
# which means the function itself.
names_dicts = [next(names_dicts)]