Python: ObjectAPI to ValueAPI: UselessClass: Adds preliminary modernization

This commit is contained in:
Rebecca Valentine
2020-04-09 15:25:38 -07:00
parent 9f18a15a93
commit 8e91f10030

View File

@@ -22,9 +22,9 @@ predicate does_not_define_special_method(Class cls) {
}
predicate no_inheritance(Class c) {
not exists(ClassObject cls, ClassObject other |
cls.getPyClass() = c and
other != theObjectType()
not exists(ClassValue cls, ClassValue other |
cls.getScope() = c and
other != ClassValue::object()
|
other.getABaseType() = cls or
cls.getABaseType() = other