Skip to content

Commit 5aee715

Browse files
yofftausbn
andauthored
Apply suggestions from code review
Co-authored-by: Taus <[email protected]>
1 parent 64b1aea commit 5aee715

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ predicate runtimeJumpStep(Node nodeFrom, Node nodeTo) {
275275
// Module variable write
276276
nodeFrom = nodeTo.(ModuleVariableNode).getAWrite()
277277
or
278+
// Setting the possible values of the variable at the end of import time
278279
exists(SsaVariable def |
279280
def = any(SsaVariable var).getAnUltimateDefinition() and
280281
def.getDefinition() = nodeFrom.asCfgNode() and

python/ql/test/experimental/dataflow/module-initialization/multiphase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def SINK_F(x):
2424
if is_source(x): #$ runtimeFlow="ModuleVariableNode for multiphase.is_source, l:-24 -> is_source"
2525
print("Unexpected flow", x) #$ runtimeFlow="ModuleVariableNode for multiphase.print, l:-25 -> print"
2626
else:
27-
print("OK") #$ Unexpected result: runtimeFlow="ModuleVariableNode for multiphase.print, l:-27 -> print"
27+
print("OK") #$ runtimeFlow="ModuleVariableNode for multiphase.print, l:-27 -> print"
2828

2929
def set_foo():
3030
global foo

0 commit comments

Comments
 (0)