mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-18 14:29:40 +08:00
fix a logic issue in the flow_analysis.Status.__and__
This commit is contained in:
@@ -11,7 +11,7 @@ class Status(object):
|
|||||||
|
|
||||||
def __and__(self, other):
|
def __and__(self, other):
|
||||||
if UNSURE in (self, other):
|
if UNSURE in (self, other):
|
||||||
return other
|
return UNSURE
|
||||||
else:
|
else:
|
||||||
return REACHABLE if self._value and other._value else UNREACHABLE
|
return REACHABLE if self._value and other._value else UNREACHABLE
|
||||||
|
|
||||||
@@ -34,6 +34,8 @@ def break_check(evaluator, base_scope, element_scope):
|
|||||||
reachable = Status.lookup_table[values.pop()]
|
reachable = Status.lookup_table[values.pop()]
|
||||||
else:
|
else:
|
||||||
return UNSURE
|
return UNSURE
|
||||||
|
elif element_scope.command == 'try':
|
||||||
|
reachable = UNSURE
|
||||||
|
|
||||||
if base_scope != element_scope and base_scope != element_scope.parent:
|
if base_scope != element_scope and base_scope != element_scope.parent:
|
||||||
return reachable & break_check(evaluator, base_scope, element_scope.parent)
|
return reachable & break_check(evaluator, base_scope, element_scope.parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user