File tree Expand file tree Collapse file tree
python/ql/src/semmle/python/objects Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,11 +322,7 @@ class ClassValue extends Value {
322322
323323 /** Gets an improper super type of this class. */
324324 ClassValue getASuperType ( ) {
325- result = this .getBaseType ( _)
326- or
327- result = this .getASuperType ( ) .getBaseType ( _)
328- or
329- result = this
325+ result = this .getABaseType * ( )
330326 }
331327
332328 /** Looks up the attribute `name` on this class.
@@ -371,6 +367,11 @@ class ClassValue extends Value {
371367 result = Types:: getBase ( this , n )
372368 }
373369
370+ /** Gets a base class of this class */
371+ ClassValue getABaseType ( ) {
372+ result = Types:: getBase ( this , _)
373+ }
374+
374375 /** Holds if this class is a new style class.
375376 A new style class is one that implicitly or explicitly inherits from `object`. */
376377 predicate isNewStyle ( ) {
You can’t perform that action at this time.
0 commit comments