Skip to content

Commit 8e91f10

Browse files
committed
Python: ObjectAPI to ValueAPI: UselessClass: Adds preliminary modernization
1 parent 9f18a15 commit 8e91f10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/ql/src/Classes/UselessClass.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ predicate does_not_define_special_method(Class cls) {
2222
}
2323

2424
predicate no_inheritance(Class c) {
25-
not exists(ClassObject cls, ClassObject other |
26-
cls.getPyClass() = c and
27-
other != theObjectType()
25+
not exists(ClassValue cls, ClassValue other |
26+
cls.getScope() = c and
27+
other != ClassValue::object()
2828
|
2929
other.getABaseType() = cls or
3030
cls.getABaseType() = other

0 commit comments

Comments
 (0)