@@ -387,7 +387,7 @@ private predicate concrete_class(PythonClassObjectInternal cls) {
387387 not exists ( Raise r , Name ex |
388388 r .getScope ( ) = f and
389389 ( r .getException ( ) = ex or r .getException ( ) .( Call ) .getFunc ( ) = ex ) and
390- ( ex .getId ( ) = "NotImplementedError" or ex . getId ( ) = "NotImplemented" )
390+ ex .getId ( ) = [ "NotImplementedError" , "NotImplemented" ]
391391 )
392392 )
393393 )
@@ -437,11 +437,7 @@ predicate missing_imported_module(ControlFlowNode imp, Context ctx, string name)
437437 * Helper for missing modules to determine if name `x.y` is a module `x.y` or
438438 * an attribute `y` of module `x`. This list should be added to as required.
439439 */
440- predicate common_module_name ( string name ) {
441- name = "zope.interface"
442- or
443- name = "six.moves"
444- }
440+ predicate common_module_name ( string name ) { name = [ "zope.interface" , "six.moves" ] }
445441
446442/**
447443 * A declaration of a class, either a built-in class or a source definition
@@ -482,16 +478,11 @@ library class ClassDecl extends @py_object {
482478 */
483479 predicate isSpecial ( ) {
484480 exists ( string name | this = Builtin:: special ( name ) |
485- name = "type" or
486- name = "super" or
487- name = "bool" or
488- name = "NoneType" or
489- name = "tuple" or
490- name = "property" or
491- name = "ClassMethod" or
492- name = "StaticMethod" or
493- name = "MethodType" or
494- name = "ModuleType"
481+ name =
482+ [
483+ "type" , "super" , "bool" , "NoneType" , "tuple" , "property" , "ClassMethod" , "StaticMethod" ,
484+ "MethodType" , "ModuleType"
485+ ]
495486 )
496487 }
497488
@@ -514,11 +505,7 @@ library class ClassDecl extends @py_object {
514505
515506 /** Holds if this class is the abstract base class */
516507 predicate isAbstractBaseClass ( string name ) {
517- exists ( Module m |
518- m .getName ( ) = "_abcoll"
519- or
520- m .getName ( ) = "_collections_abc"
521- |
508+ exists ( Module m | m .getName ( ) = [ "_abcoll" , "_collections_abc" ] |
522509 this .getClass ( ) .getScope ( ) = m and
523510 this .getName ( ) = name
524511 )
0 commit comments