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

Module DefinitionTracking

Definition tracking for jump-to-defn query.

Import path

import analysis.DefinitionTracking

Imports

IDEContextual

Provides shared predicates related to contextual queries in the code viewer.

PointsTo
python

Predicates

definitionOf

Gets the definition (of kind kind) for the expression use, if one can be found.

getADefinition

Gets a definition for ‘use’. This exists primarily for testing use getPreferredDefinition() instead.

getUniqueDefinition

Gets the unique definition for ‘use’, if one can be found. Helper for the jump-to-definition query.

ssa_filter_defn

Holds if ESSA edge refinement, def, is defined by defn

ssa_filter_jump_to_defn_attribute

Holds if ESSA edge refinement, def, is defined by defn of priority

ssa_variable_jump_to_defn_attribute

INTERNAL – Public for testing only. Holds if the attribute name of the ssa variable var refers to (value, cls, origin)

uni_edged_phi_defn

Holds if ESSA defn, uniphi,is defined by defn

Classes

Definition

A definition for the purposes of jump-to-definition.

NiceLocationExpr

A helper class to get suitable locations for attributes