Skip to content

Commit d274fa1

Browse files
committed
Python: Hide ModuleVariableNode in data-flow paths
They just add an extra step, and don't actually contribute any good information for end-users.
1 parent 0c4bcec commit d274fa1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,8 @@ predicate forceHighPrecision(Content c) { none() }
928928

929929
/** Holds if `n` should be hidden from path explanations. */
930930
predicate nodeIsHidden(Node n) {
931+
n instanceof ModuleVariableNode
932+
or
931933
n instanceof SummaryNode
932934
or
933935
n instanceof SummaryParameterNode

0 commit comments

Comments
 (0)