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

Class LocalVariable

A local (function or class) variable

Import path

import python

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

isParameter

Whether this variable is a parameter

isSelf

Holds if this variable is the first parameter of a method. It is not necessarily called “self”

toString

Gets a textual representation of this element.

Inherited predicates

escapes

Whether there is an access to this variable outside of its own scope. Usually occurs in nested functions or for global variables.

from Variable
getALoad

Gets a load of this variable

from Variable
getAStore

Gets a store of this variable

from Variable
getAUse

Gets a use of this variable

from Variable
getAnAccess

Gets an access (load or store) of this variable

from Variable
getId

Gets the identifier (name) of this variable

from Variable
getScope

Gets the scope of this variable

from Variable

Charpred