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

Datatype TParameterPosition

Import path

import semmle.python.dataflow.new.internal.DataFlowDispatch

Known direct subtypes

    Branch types

    TDictSplatParameterPosition
    TKeywordParameterPosition
    TLambdaSelfParameterPosition

    This is used for tracking flow through captured variables, and we use separate parameter/argument positions in order to distinguish “lambda self” from “normal self”, as lambdas may also access outer self variables (through variable capture).

    TPositionalParameterLowerBoundPosition
    TPositionalParameterPosition
    TSelfParameterPosition

    Used for self in methods, and cls in classmethods.

    TStarArgsParameterPosition
    TSynthDictSplatParameterPosition
    TSynthStarArgsElementParameterPosition

    Injectors

    TDictSplatParameterPosition
    TKeywordParameterPosition
    TLambdaSelfParameterPosition

    This is used for tracking flow through captured variables, and we use separate parameter/argument positions in order to distinguish “lambda self” from “normal self”, as lambdas may also access outer self variables (through variable capture).

    TPositionalParameterLowerBoundPosition
    TPositionalParameterPosition
    TSelfParameterPosition

    Used for self in methods, and cls in classmethods.

    TStarArgsParameterPosition
    TSynthDictSplatParameterPosition
    TSynthStarArgsElementParameterPosition