1
0
forked from VimPlug/jedi

More small bug fixes.

This commit is contained in:
Dave Halter
2016-12-02 15:21:50 +01:00
parent dfc06dfe83
commit 565989cf07
4 changed files with 9 additions and 14 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ def filter_definition_names(names, origin, position=None):
scope = stmt.get_parent_scope()
if not (isinstance(scope, er.FunctionExecution) and
isinstance(scope.base, er.LambdaWrapper)):
isinstance(scope.base, LambdaWrapper)):
names = filter_after_position(names, position, origin)
names = [name for name in names
if name.is_definition() and not is_comprehension_name(name, origin)]
@@ -386,7 +386,7 @@ def _name_to_types(evaluator, context, name):
types = _apply_decorators(evaluator, context, node)
elif node.type == 'global_stmt':
context = evaluator.create_context(context, name)
finder = NameFinder(evaluator, context, str(name))
finder = NameFinder(evaluator, context, context, str(name))
filters = finder.get_filters(search_global=True)
# For global_stmt lookups, we only need the first possible scope,
# which means the function itself.