◐ Shell
clean mode source ↗

Python: inline init_module_submodule_defn into ImportResolution by yoff · Pull Request #21930 · github/codeql

The new-dataflow ImportResolution module only used
semmle.python.essa.SsaDefinitions for the 5-line helper predicate
SsaSource::init_module_submodule_defn. Inline it locally and drop the
dependency on legacy SsaDefinitions. This is the only remaining direct
import of semmle.python.essa.* in the new dataflow stack, so dropping
it makes the layering cleaner.

Semantic noop on the current SSA: SsaSourceVariable.getName() and
GlobalVariable.getId() both project the same DB column
(variable(_,_,result)), and the old call's 'init.getEntryNode() = f'
join was just constraining init = package via Scope.getEntryNode()'s
functional uniqueness. RA dump of accesses.ql confirms only the
expected predicate-rename shuffle; all 70 dataflow + ApiGraphs library
tests pass.

This factors out commit 8cab5a2 from the larger shared-CFG
migration #21925.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

AI review requested due to automatic review settings

June 2, 2026 08:24

@yoff yoff mentioned this pull request

Jun 2, 2026

BazookaMusic

@yoff yoff changed the base branch from main to yoff/python-simplify-decorator-predicates

June 3, 2026 07:34

Base automatically changed from yoff/python-simplify-decorator-predicates to main

June 8, 2026 20:04