mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-15 10:07:06 +08:00
Fix a wrong branch check, fixes #1128
This commit is contained in:
@@ -60,7 +60,8 @@ def reachability_check(context, context_scope, node, origin_scope=None):
|
|||||||
if not branch_matches and origin_keyword == 'else' \
|
if not branch_matches and origin_keyword == 'else' \
|
||||||
and node_keyword == 'except':
|
and node_keyword == 'except':
|
||||||
return UNREACHABLE
|
return UNREACHABLE
|
||||||
break
|
if branch_matches:
|
||||||
|
break
|
||||||
|
|
||||||
# Direct parents get resolved, we filter scopes that are separate
|
# Direct parents get resolved, we filter scopes that are separate
|
||||||
# branches. This makes sense for autocompletion and static analysis.
|
# branches. This makes sense for autocompletion and static analysis.
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ finally:
|
|||||||
x
|
x
|
||||||
x = tuple
|
x = tuple
|
||||||
|
|
||||||
|
if False:
|
||||||
|
with open("") as defined_in_false:
|
||||||
|
#? ['seekable']
|
||||||
|
defined_in_false.seekab
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# Return checks
|
# Return checks
|
||||||
|
|||||||
Reference in New Issue
Block a user