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

Class DjangoModel

A django model class

Import path

import semmle.python.web.django.Model

Direct supertypes

Indirect supertypes

Inherited predicates

attr

Gets a Value that represents the attribute name of this object.

from Value
declaredAttribute

Gets the attribute declared in this class

from ClassValue
declaresAttribute

Holds if this class declares the attribute name, not including attributes declared by super classes.

from ClassValue
failedInferencefrom ClassValue
getABaseType

Gets an immediate base type of this class.

from ClassValue
getABooleanValue

Gets the boolean interpretation of this value. Could be both true and false, if we can’t determine the result more precisely.

from Value
getACall

Gets a call to this object

from Value
getACall

Gets a call to this object with the given caller context.

from Value
getAReference

Gets a ControlFlowNode that refers to this object.

from Value
getASuperType

Gets an improper super type of this class.

from ClassValue
getBaseType

Gets the nth immediate base type of this class.

from ClassValue
getClass

Gets the class of this object. Strictly, the Value representing the class of the objects represented by this Value.

from Value
getDefiniteBooleanValue

Gets the boolean interpretation of this value, only if we can determine the result precisely. The result can be none(), but never both true and false.

from Value
getMro

Gets the MRO for this class

from ClassValue
getName

Gets the name of this value, if it has one. Note this is the innate name of the object, not necessarily all the names by which it can be called.

from Value
getOrigin

Gets the origin CFG node for this value.

from Value
getQualifiedName

Gets the qualified name for this class. Should return the same name as the __qualname__ attribute on classes in Python 3.

from ClassValue
getScope

Gets the scope associated with this class, if it is not a builtin class

from ClassValue
hasAttribute

Holds if this class has the attribute name, including attributes declared by super classes.

from ClassValue
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from Value
isAbsent

Whether this value is absent from the database, but has been inferred to likely exist

from Value
isBuiltin

Holds if this value is builtin. Applies to built-in functions and methods, but also integers and strings.

from Value
isCallablefrom ClassValue
isContainer

Holds if this class is a container(). That is, does it have a getitem method.

from ClassValue
isContextManager

Holds if this class is a context manager.

from ClassValue
isDescriptorType

Holds if this class is a descriptor.

from ClassValue
isIterable

Holds if this class is an iterable.

from ClassValue
isIterator

Holds if this class is an iterator.

from ClassValue
isLegalExceptionType

Whether this class is a legal exception class. What constitutes a legal exception class differs between major versions

from ClassValue
isMapping

Holds if this class is a mapping. Mutually exclusive with isSequence().

from ClassValue
isNewStyle

Holds if this class is a new style class. A new style class is one that implicitly or explicitly inherits from object.

from ClassValue
isOldStyle

Holds if this class is an old style class. An old style class is one that does not inherit from object.

from ClassValue
isSequence

Holds if this class is a sequence. Mutually exclusive with isMapping().

from ClassValue
lookup

Looks up the attribute name on this class. Note that this may be different from this.attr(name). For example given the class: class C: @classmethod def f(cls): pass this.lookup("f") is equivalent to C.__dict__['f'], which is the class-method whereas this.attr("f") is equivalent to C.f, which is a bound-method.

from ClassValue
overrides

Whether this overrides v. In this context, “overrides” means that this object is a named attribute of a some class C and v is a named attribute of another class S, both attributes having the same name, and S is a super class of C.

from Value
toString

Gets a textual representation of this element.

from Value

Charpred