CodeQL library for Python
codeql/python-all 0.11.12 (changelog, source)
Search

Member predicate ModuleValue::isUsedAsScript

When used (exclusively) as a script (will not include normal modules that can also be run as a script)

predicate isUsedAsScript()