mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-18 14:29:40 +08:00
move flowscope stuff to the right place
This commit is contained in:
@@ -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))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user