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

Module Module

Import path

import semmle.python.Module

Imports

Predicates

isPreferredModuleForName

Holds if the Container c should be the preferred file or folder for the given name when performing imports. Trivially true for any container if it is the only one with its name. However, if there are several modules with the same name, then this is the module most likely to be imported under that name.

legalShortName
moduleNameFromFile

Gets the name of the module that c resolves to, if any.

Classes

Module

A module. This is the top level element in an AST, corresponding to a source file. It is also a Scope; the scope of global variables.