move flowscope stuff to the right place

This commit is contained in:
Dave Halter
2014-01-06 16:27:58 +01:00
parent 0e69ad478b
commit 3f80de34e3
2 changed files with 15 additions and 17 deletions
+2 -4
View File
@@ -231,6 +231,8 @@ class NameFinder(object):
if not name.parent or p == s: if not name.parent or p == s:
break break
break_scopes.append(p) break_scopes.append(p)
if result:
break
while flow_scope: while flow_scope:
# TODO check if result is in scope -> no evaluation necessary # TODO check if result is in scope -> no evaluation necessary
@@ -245,9 +247,6 @@ class NameFinder(object):
if flow_scope == nscope: if flow_scope == nscope:
break break
flow_scope = flow_scope.parent flow_scope = flow_scope.parent
flow_scope = nscope
if result:
break
if not result and isinstance(nscope, er.Instance): if not result and isinstance(nscope, er.Instance):
# __getattr__ / __getattribute__ # __getattr__ / __getattribute__
@@ -258,7 +257,6 @@ class NameFinder(object):
def find(self, scopes, resolve_decorator=True): def find(self, scopes, resolve_decorator=True):
filtered = self.filter_name(scopes) filtered = self.filter_name(scopes)
#print 'f', filtered
return self._resolve_descriptors(self._remove_statements(filtered, return self._resolve_descriptors(self._remove_statements(filtered,
resolve_decorator)) resolve_decorator))