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

Predicate API::moduleImport

Gets a node corresponding to an import of module m.

Note: You should only use this predicate for top level modules. If you want nodes corresponding to a submodule, you should use .getMember on the parent module. For example, for nodes corresponding to the module foo.bar, use moduleImport("foo").getMember("bar").

Import path

import semmle.python.ApiGraphs
Node moduleImport(string m)