From cd5b8aebfd06eae74c866a91627478f6343e1f99 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 9 Jun 2014 20:28:24 +0200 Subject: [PATCH] fix issues with equal names before and after listcomprehension --- jedi/evaluate/finder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jedi/evaluate/finder.py b/jedi/evaluate/finder.py index 8a5f96aa..86e018fb 100644 --- a/jedi/evaluate/finder.py +++ b/jedi/evaluate/finder.py @@ -469,6 +469,8 @@ def get_names_of_scope(evaluator, scope, position=None, star_search=True, includ :rtype: [(pr.Scope, [pr.Name])] :return: Return an generator that yields a pair of scope and names. """ + if isinstance(scope, iterable.ListComprehensionFlow): + position = scope.list_comprehension.parent.start_pos in_func_scope = scope non_flow = scope.get_parent_until(pr.Flow, reverse=True) while scope: