Skip to content

Commit 1f5176d

Browse files
tausbnyoff
andauthored
Python: Simplify class_var_scope
Co-authored-by: yoff <lerchedahl@gmail.com>
1 parent b5cac92 commit 1f5176d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

python/ql/lib/semmle/python/types/ImportTime.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ private predicate global_var_scope(string name, Scope scope, GlobalVariable var)
4040
}
4141

4242
pragma[nomagic]
43-
private predicate class_var_scope(Scope scope, string name, LocalVariable var) {
44-
var.getScope() = scope and
45-
scope instanceof Class and
43+
private predicate class_var_scope(Class cls, string name, LocalVariable var) {
44+
var.getScope() = cls and
4645
var.getId() = name
4746
}

0 commit comments

Comments
 (0)