Skip to content

Commit 48e67bc

Browse files
committed
Python: Modernizes query
1 parent 02ae0fb commit 48e67bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/ql/src/Functions/UseImplicitNoneReturnValue.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ predicate is_used(Call c) {
2323
)
2424
}
2525

26-
from Call c, FunctionObject func
26+
from Call c, FunctionValue func
2727
where
2828
/* Call result is used, but callee is a procedure */
29-
is_used(c) and c.getFunc().refersTo(func) and func.getFunction().isProcedure() and
29+
is_used(c) and c.getFunc().pointsTo(func) and func.getScope().isProcedure() and
3030
/* All callees are procedures */
31-
forall(FunctionObject callee | c.getFunc().refersTo(callee) | callee.getFunction().isProcedure()) and
31+
forall(FunctionValue callee | c.getFunc().pointsTo(callee) | callee.getScope().isProcedure()) and
3232
/* Mox return objects have an `AndReturn` method */
3333
not useOfMoxInModule(c.getEnclosingModule())
3434
select c, "The result of '$@' is used even though it is always None.", func, func.getQualifiedName()

0 commit comments

Comments
 (0)