Files
codeql/python/ql/test/library-tests/variables/scopes/lookup.ql
2022-09-06 10:11:37 +02:00

19 lines
301 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, l