Skip to content

Commit d2f9850

Browse files
committed
Python: Fix missing modernisation.
1 parent ab2c8f3 commit d2f9850

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

python/ql/src/Variables/UndefinedExport.ql

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,20 @@ predicate declaredInAll(Module m, StrConst name) {
2525

2626
predicate mutates_globals(ModuleValue m) {
2727
exists(CallNode globals |
28-
globals = Object::builtin("globals").(FunctionObject).getACall() and
28+
globals = Value::named("globals").(FunctionValue).getACall() and
2929
globals.getScope() = m.getScope()
3030
|
3131
exists(AttrNode attr | attr.getObject() = globals)
3232
or
3333
exists(SubscriptNode sub | sub.getValue() = globals and sub.isStore())
3434
)
3535
or
36-
exists(Object enum_convert |
37-
enum_convert.hasLongName("enum.Enum._convert") and
36+
exists(Value enum_convert, ClassValue enum_class |
37+
enum_class.getASuperType() = Value::named("enum.Enum") and
38+
enum_convert = enum_class.attr("_convert") and
3839
exists(CallNode call | call.getScope() = m.getScope() |
39-
enum_convert.(FunctionObject).getACall() = call or
40-
call.getFunction().refersTo(enum_convert)
40+
enum_convert.getACall() = call or
41+
call.getFunction().pointsTo(enum_convert)
4142
)
4243
)
4344
}

0 commit comments

Comments
 (0)