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

Predicate API::moduleImportExists

Holds if an import of module m exists.

This is determined without referring to Node, allowing this predicate to be used in a negative context when constructing new nodes.

Import path

import semmle.python.ApiGraphs
predicate moduleImportExists(string m)