Skip to content

Commit 3b45fbc

Browse files
committed
Adds rough modernization.
1 parent 5269fb7 commit 3b45fbc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

python/ql/src/Expressions/UseofApply.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
*/
1111

1212
import python
13+
private import semmle.python.objects.TObject
14+
private import semmle.python.types.Builtins
1315

1416
from CallNode call, ControlFlowNode func
1517
where
16-
major_version() = 2 and call.getFunction() = func and func.refersTo(Object::builtin("apply"))
18+
major_version() = 2 and call.getFunction() = func and func.pointsTo(TBuiltinFunctionObject(Builtin::special("apply")))
1719
select call, "Call to the obsolete builtin function 'apply'."

0 commit comments

Comments
 (0)