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

View File

@@ -444,7 +444,7 @@ class Evaluator(object):
follow_res = []
for s in scopes:
follow_res += self.find_types(s, search, pos,
search_global=search_global, is_goto=True)
search_global=search_global, is_goto=True)
return follow_res, search

View File

@@ -231,24 +231,23 @@ class NameFinder(object):
if not name.parent or p == s:
break
break_scopes.append(p)
while flow_scope:
# TODO check if result is in scope -> no evaluation necessary
n = dynamic.check_flow_information(self._evaluator, flow_scope,
self.name_str, self.position)
if n:
result = n
break
if result:
break
if flow_scope == nscope:
break
flow_scope = flow_scope.parent
flow_scope = nscope
if result:
break
while flow_scope:
# TODO check if result is in scope -> no evaluation necessary
n = dynamic.check_flow_information(self._evaluator, flow_scope,
self.name_str, self.position)
if n:
result = n
break
if result:
break
if flow_scope == nscope:
break
flow_scope = flow_scope.parent
if not result and isinstance(nscope, er.Instance):
# __getattr__ / __getattribute__
result += self._check_getattr(nscope)
@@ -258,7 +257,6 @@ class NameFinder(object):
def find(self, scopes, resolve_decorator=True):
filtered = self.filter_name(scopes)
#print 'f', filtered
return self._resolve_descriptors(self._remove_statements(filtered,
resolve_decorator))