CodeQL library for Python
codeql/python-all 2.1.1-dev (changelog, source)
Search

Module ClassObject

Import path

import semmle.python.types.ClassObject

Imports

Predicates

theAbcMetaClassObject
theAttributeErrorType

Gets the builtin class ‘AttributeError’

theBaseExceptionType

Gets the builtin class ‘BaseException’

theBoolType

Gets the built-in class ‘bool’

theBoundMethodType

Gets the builtin class of bound methods

theBuiltinFunctionType

Gets the class of builtin-functions

theBuiltinPropertyType

Gets the class of builtin properties

theBytesType

Gets the builtin class for bytes. str in Python2, bytes in Python3

theClassMethodType

Gets the builtin class ‘classmethod’

theClassType

Gets the builtin object ClassType (for old-style classes)

theComplexType

Gets the builtin class ‘complex’

theDictType

Gets the builtin class ‘dict’

theExceptionType

Gets the builtin class ‘Exception’

theFloatType

Gets the builtin class ‘float’

theGeneratorType

Gets the class of generators

theGetSetDescriptorType

Gets the builtin class of builtin properties

theIOErrorType

Gets the builtin class ‘IOError’

theInstanceType

Gets the builtin object InstanceType (for old-style classes)

theIntType

Gets the builtin class ‘int’

theKeyErrorType

Gets the builtin class ‘KeyError’

theListType

Gets the builtin class ‘list’

theLongType

Gets the builtin class ‘long’ (Python 2 only)

theMethodDescriptorType

Gets the method descriptor class

theModuleType

Gets the class of modules

theNoneType

Gets the built-in class NoneType

theNotImplementedErrorType

Gets the builtin class ‘NotImplementedError’

theObjectType

Gets the builtin class ‘object’

thePropertyType

Gets the builtin class ‘property’

thePyFunctionType

Gets the class of Python functions

theRangeType

Gets the builtin class ‘(x)range’

theSetType

Gets the builtin class ‘set’

theStaticMethodType

Gets the builtin class ‘staticmethod’

theStopIterationType

Gets the builtin class ‘StopIteration’

theStrType

Gets the ‘str’ class. This is the same as the ‘bytes’ class for Python 2 and the ‘unicode’ class for Python 3

theSuperType

Gets the builtin class ‘super’

theTupleType

Gets the builtin class ‘tuple’

theTypeErrorType

Gets the builtin class ‘TypeError’

theTypeType

Gets the builtin class ‘type’

theUnicodeType

Gets the builtin class for unicode. unicode in Python2, str in Python3

Classes

ClassObject

A class whose instances represents Python classes. Instances of this class represent either builtin classes such as list or str, or program-defined Python classes present in the source code.