Skip to content

Commit 8414d46

Browse files
committed
Python: Fix accidentally introduced cartesian product.
1 parent 83d4fb6 commit 8414d46

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/ql/src/semmle/python/dependencies/Dependencies.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ private predicate defn_of_class_attribute(Assign asgn, Class c, string name) {
193193
/* Holds if `value` is a value assigned to the `name`d attribute of module `m`. */
194194
private predicate defn_of_module_attribute(ControlFlowNode value, Module m, string name) {
195195
exists(DefinitionNode def |
196+
def.getScope() = m and
196197
def.getValue() = value and
197198
def.(NameNode).getId() = name
198199
)

0 commit comments

Comments
 (0)