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

Injector TSyntheticPreUpdateNode

A synthetic node representing the value of an object before a state change.

For class calls we pass a synthetic self argument, so attribute writes in __init__ is reflected on the resulting object (we need special logic for this since there is no return in __init__)

Import path

import semmle.python.dataflow.new.internal.DataFlowPublic
TSyntheticPreUpdateNode TSyntheticPreUpdateNode(CallNode call)