1
0
forked from VimPlug/jedi

jedi should be able to detect exceptions even in except X: statements

This commit is contained in:
Dave Halter
2014-06-23 12:07:51 +02:00
parent e106e4ffc8
commit 9348d4bb6c
2 changed files with 11 additions and 2 deletions

View File

@@ -147,8 +147,10 @@ def get_module_statements(module):
def add_stmts(stmts):
new = set()
for stmt in stmts:
if isinstance(stmt, pr.Scope):
new |= add_stmts(stmt.inputs)
if isinstance(stmt, pr.Flow):
while stmt is not None:
new |= add_stmts(stmt.inputs)
stmt = stmt.next
continue
if isinstance(stmt, pr.KeywordStatement):
stmt = stmt.stmt

View File

@@ -50,6 +50,13 @@ try:
str.not_existing
except [AttributeError]: pass
# Should be able to detect errors in except statement as well.
try:
pass
#! 7 name-error
except Undefined:
pass
# -----------------
# kind of similar: hasattr