Skip to content

Commit df7f43e

Browse files
committed
Adds modernization
1 parent 2df3fe8 commit df7f43e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/ql/src/Expressions/UnnecessaryLambda.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ predicate unnecessary_lambda(Lambda l, Expr e) {
3838
simple_wrapper(l, e) and
3939
(
4040
/* plain class */
41-
exists(ClassObject c | e.refersTo(c))
41+
exists(ClassValue c | e.pointsTo(c))
4242
or
4343
/* plain function */
44-
exists(FunctionObject f | e.refersTo(f))
44+
exists(FunctionValue f | e.pointsTo(f))
4545
or
4646
/* bound-method of enclosing instance */
47-
exists(ClassObject cls, Attribute a |
48-
cls.getPyClass() = l.getScope().getScope() and a = e |
47+
exists(ClassValue cls, Attribute a |
48+
cls.getScope() = l.getScope().getScope() and a = e |
4949
((Name)a.getObject()).getId() = "self" and
5050
cls.hasAttribute(a.getName())
5151
)

0 commit comments

Comments
 (0)