mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
Python API: Add ClassValue.getABaseType()
This commit is contained in:
@@ -322,11 +322,7 @@ class ClassValue extends Value {
|
||||
|
||||
/** Gets an improper super type of this class. */
|
||||
ClassValue getASuperType() {
|
||||
result = this.getBaseType(_)
|
||||
or
|
||||
result = this.getASuperType().getBaseType(_)
|
||||
or
|
||||
result = this
|
||||
result = this.getABaseType*()
|
||||
}
|
||||
|
||||
/** Looks up the attribute `name` on this class.
|
||||
@@ -371,6 +367,11 @@ class ClassValue extends Value {
|
||||
result = Types::getBase(this, n)
|
||||
}
|
||||
|
||||
/** Gets a base class of this class */
|
||||
ClassValue getABaseType() {
|
||||
result = Types::getBase(this, _)
|
||||
}
|
||||
|
||||
/** Holds if this class is a new style class.
|
||||
A new style class is one that implicitly or explicitly inherits from `object`. */
|
||||
predicate isNewStyle() {
|
||||
|
||||
Reference in New Issue
Block a user