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

Predicate iterableUnpackingElementReadStep

Step 5 For a sequence node inside an iterable unpacking, data flows from the sequence to its elements. There are three cases for what toNode should be: a) If the element is a plain variable, toNode is the corresponding control flow node.

b) If the element is itself a sequence, with control-flow node `seq`, `toNode` is `TIterableSequence(seq)`.

c) If the element is a starred variable, with control-flow node `v`, `toNode` is `TIterableElement(v)`.

Import path

import semmle.python.dataflow.new.internal.IterableUnpacking
predicate iterableUnpackingElementReadStep(Node nodeFrom, Content c, Node nodeTo)