1
0
forked from VimPlug/jedi

decorators should also be included in the static analysis

This commit is contained in:
Dave Halter
2014-05-16 15:33:21 +02:00
parent 0f7a17090c
commit 11b7f9f7f6
2 changed files with 16 additions and 0 deletions

View File

@@ -138,4 +138,11 @@ def get_module_statements(module):
imports |= set(scope.imports)
stmts |= add_stmts(scope.statements)
stmts |= add_stmts(r for r in scope.returns if r is not None)
try:
decorators = scope.decorators
except AttributeError:
pass
else:
stmts |= add_stmts(decorators)
return stmts, imports