Files
codeql/python/ql/test/library-tests/variables/scopes/lookup.ql
2020-03-30 11:59:10 +02:00

19 lines
390 B
Plaintext

import python
from NameNode n, string l
where
n.isLoad() and
(
n.isGlobal() and l = "global"
or
n.isLocal() and l = "local"
or
n.isNonLocal() and l = "non-local"
or
not n.isGlobal() and
not n.isLocal() and
not n.isNonLocal() and
l = "none"
)
select n.getLocation().getStartLine(), n.toString(), l