Skip to content

Commit 8c13fc5

Browse files
committed
Prepare LocalSourceNode for locality
Removes the dependence on the (global) `ModuleVariableNode.getARead()`. In the charpred we simply inline it. In `localSourceFlowStep` we discard any step _into_ a local source node.
1 parent 2d4da80 commit 8c13fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/LocalSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class LocalSourceNode extends Node {
6767
or
6868
// We explicitly include any read of a global variable, as some of these may have local flow going
6969
// into them.
70-
this = any(ModuleVariableNode mvn).getARead()
70+
this.asCfgNode() = any(GlobalVariable v).getALoad().getAFlowNode()
7171
or
7272
// We include all scope entry definitions, as these act as the local source within the scope they
7373
// enter.

0 commit comments

Comments
 (0)