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

Class EssaVariable

An (enhanced) SSA variable derived from SsaSourceVariable.

Import path

import python

Direct supertypes

Known direct subtypes

Predicates

getASourceUse

Gets a use of this variable, where a “use” is defined by SsaSourceVariable.getASourceUse(). Note that this differs from EssaVariable.getAUse().

getAUse

Gets a use of this variable, where a “use” is defined by SsaSourceVariable.getAUse(). Note that this differs from EssaVariable.getASourceUse().

getDefinition

Gets the (unique) definition of this variable.

getLocation

Gets the location of this variable.

getName

Gets the name of this variable.

getRepresentation

Gets a string representation of this variable. WARNING: The format of this may change and it may be very inefficient to compute. To used for debugging and testing only.

getScope

Gets the scope of this variable.

getSourceVariable

Gets the source variable from which this variable is derived.

isMetaVariable

Holds if this the meta-variable for a scope. This is used to attach attributes for undeclared variables implicitly defined by from ... import * and the like.

toString

Gets a textual representation of this element.