Skip to content

Commit 5e62f54

Browse files
authored
Merge pull request github#3030 from BekaValentine/python-objectapi-to-valueapi-useimplicitnonereturnvalue
Python: ObjectAPI to ValueAPI: UseImplicitNoneReturnValue
2 parents 1b8154c + 48e67bc commit 5e62f54

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)