Skip to content

Commit 39705cf

Browse files
committed
Python: Clarify predicate a bit.
1 parent 2129949 commit 39705cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/ql/src/semmle/python/dataflow/SsaDefinitions.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,11 @@ cached module SsaSource {
404404
* to the __init__ module of that package.
405405
*/
406406
cached predicate init_module_submodule_defn(PythonSsaSourceVariable var, ControlFlowNode f) {
407+
var instanceof GlobalVariable and
407408
exists(Module init |
408409
init.isPackageInit() and exists(init.getPackage().getSubModule(var.getName())) and
409410
init.getEntryNode() = f and
410-
var.getScope() = init and
411-
var instanceof GlobalVariable
411+
var.getScope() = init
412412
)
413413
}
414414

0 commit comments

Comments
 (0)