mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
Will need subsequent PRs fixing up test failures (due to deprecated methods moving around), but other than that everything should be straight-forward.
17 lines
384 B
Plaintext
17 lines
384 B
Plaintext
import python
|
|
|
|
from ModuleValue mv, string usage
|
|
where
|
|
// builtin module has different name in Python 2 and 3
|
|
not mv = Module::builtinModule() and
|
|
(
|
|
mv.isUsedAsModule() and usage = "isUsedAsModule"
|
|
or
|
|
mv.isUsedAsScript() and usage = "isUsedAsScript"
|
|
or
|
|
not mv.isUsedAsModule() and
|
|
not mv.isUsedAsScript() and
|
|
usage = "<UNKNOWN>"
|
|
)
|
|
select mv, usage
|