forked from VimPlug/jedi
fix returns/flow command edge cases
This commit is contained in:
@@ -114,6 +114,7 @@ def get_module_statements(module):
|
|||||||
new = set()
|
new = set()
|
||||||
for stmt in stmts:
|
for stmt in stmts:
|
||||||
if isinstance(stmt, pr.Scope):
|
if isinstance(stmt, pr.Scope):
|
||||||
|
new |= add_stmts(stmt.inputs)
|
||||||
continue
|
continue
|
||||||
if isinstance(stmt, pr.KeywordStatement):
|
if isinstance(stmt, pr.KeywordStatement):
|
||||||
stmt = stmt.stmt
|
stmt = stmt.stmt
|
||||||
@@ -136,4 +137,5 @@ def get_module_statements(module):
|
|||||||
for scope in module.walk():
|
for scope in module.walk():
|
||||||
imports |= set(scope.imports)
|
imports |= set(scope.imports)
|
||||||
stmts |= add_stmts(scope.statements)
|
stmts |= add_stmts(scope.statements)
|
||||||
|
stmts |= add_stmts(scope.returns)
|
||||||
return stmts, imports
|
return stmts, imports
|
||||||
|
|||||||
Reference in New Issue
Block a user