mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-05 03:33:33 +08:00
fix returns/flow command edge cases
This commit is contained in:
@@ -114,6 +114,7 @@ def get_module_statements(module):
|
||||
new = set()
|
||||
for stmt in stmts:
|
||||
if isinstance(stmt, pr.Scope):
|
||||
new |= add_stmts(stmt.inputs)
|
||||
continue
|
||||
if isinstance(stmt, pr.KeywordStatement):
|
||||
stmt = stmt.stmt
|
||||
@@ -136,4 +137,5 @@ def get_module_statements(module):
|
||||
for scope in module.walk():
|
||||
imports |= set(scope.imports)
|
||||
stmts |= add_stmts(scope.statements)
|
||||
stmts |= add_stmts(scope.returns)
|
||||
return stmts, imports
|
||||
|
||||
Reference in New Issue
Block a user