Class UnknownClassInternal
A class representing an unknown class
Import path
import semmle.python.objects.Classes
Direct supertypes
Indirect supertypes
Predicates
attributesUnknown | Holds if the attributes of this object are wholly or partly unknowable |
callResult | Holds if |
callResult | Holds if |
calleeAndOffset | Holds if the function |
getBuiltin | Gets the |
getClass | Gets the class of this object. |
getClassDeclaration | Gets the class declaration for this object, if it is a class with a declaration. |
getOrigin | Gets a control flow node that represents the source origin of this object, if it has a meaningful location in the source code. This method exists primarily for providing backwards compatibility and locations for source objects. Source code objects should attempt to return exactly one result for this method. |
introducedAt | Holds if this object is introduced into the code base at |
lookup | Looks up the attribute |
notTestableForEquality | True if this “object” can be meaningfully analyzed to determine the boolean value of equality tests on it. For example, |
toString | Gets a textual representation of this element. |
Inherited predicates
attribute | Approximation to descriptor protocol, skipping meta-descriptor protocol | from ClassObjectInternal |
binds | Holds if attribute lookup on this object may “bind” | from ClassObjectInternal |
booleanValue | Gets the boolean value of this object. This may be both true and false if the “object” represents a set of possible objects. | from ClassObjectInternal |
contextSensitiveCallee | from ClassObjectInternal | |
descriptorGetClass | Holds if the result of attribute access on the class holding this descriptor is | from ClassObjectInternal |
descriptorGetInstance | Holds if the result of attribute access on an instance of a class holding this descriptor is | from ClassObjectInternal |
functionAndOffset | Holds if the object | from ObjectInternal |
getIterNext | Gets the ‘object’ resulting from iterating over this object. Used in the context | from ClassObjectInternal |
getName | Gets the name of this of this object if it has a meaningful name. Note that the name of an object is not necessarily the name by which it is called For example the function named | from ClassObjectInternal |
getSource | For backwards compatibility shim – Not all objects have a “source”. Objects (except unknown and undefined values) should attempt to return exactly one result for this method. | from ObjectInternal |
hasAttribute | Holds if this value has the attribute | from ClassObjectInternal |
intValue | Gets the integer value of things that have integer values and whose integer value is tracked. That is, some ints, mainly small numbers, and bools. | from ClassObjectInternal |
isBuiltin | from ObjectInternal | |
isClass | True if this “object” is a class. That is, its class inherits from | from ClassObjectInternal |
isDescriptor | Holds if this object is a descriptor. Holds, for example, for functions and properties and not for integers. | from ClassObjectInternal |
isIterableSubclass | Holds if this is a subclass of the | from ClassObjectInternal |
isNotSubscriptedType | from ClassObjectInternal | |
isSpecial | Holds if this is a class whose instances we treat specially, rather than as a generic instance. For example, | from ClassObjectInternal |
length | Gets the length of the sequence that this “object” represents. Always returns a value for a sequence, will be -1 if the object has no fixed length. | from ClassObjectInternal |
strValue | Gets the string value of things that have string values. That is, strings. | from ClassObjectInternal |
subscriptUnknown | Holds if the result of subscripting this object are wholly or partly unknowable | from ClassObjectInternal |
useOriginAsLegacyObject | Holds if this ‘object’ represents an entity that should be exposed to the legacy points_to API This should hold for almost all objects that do not have an underlying DB object representing their source, for example | from ClassObjectInternal |