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

Class BuiltinMethodValue

A builtin method, such as list.append or set.add

Import path

import python

Direct supertypes

Indirect supertypes

Predicates

descriptiveString

Gets a longer, more descriptive version of toString()

getARaisedType

Gets a class that may be raised by this function

getAnInferredReturnType

Gets a class that this function may return

getQualifiedName

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

maxParameters

Gets the maximum number of parameters that can be correctly passed to this function

minParameters

Gets the minimum number of parameters that can be correctly passed to this function

Inherited predicates

attr

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

from Value
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
getAFunctionCall

Gets a call-site from where this function is called as a function

from FunctionValue
getAMethodCall

Gets a call-site from where this function is called as a method

from FunctionValue
getAReference

Gets a ControlFlowNode that refers to this object.

from Value
getArgumentForCall

Gets the argument in call corresponding to the n’th positional parameter of this callable.

from CallableValue
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
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
getNamedArgumentForCall

Gets the argument in call corresponding to the named keyword parameter of this callable.

from CallableValue
getOrigin

Gets the origin CFG node for this value.

from Value
getParameter

Gets the nth parameter node of this callable.

from CallableValue
getParameterByName

Gets the named parameter node of this callable.

from CallableValue
getScope

Gets the scope for this function, provided that it is a Python function.

from CallableValue
hasAttribute

Holds if this value has the attribute name

from Value
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
isLambda

Holds if this function represents a lambda.

from FunctionValue
isLegalArgumentName

Whether name is a legal argument name for this function

from FunctionValue
isNormalMethod

Whether this is a “normal” method, that is, it is exists as a class attribute which is not a lambda and not the new method.

from FunctionValue
isOverriddenMethodfrom FunctionValue
isOverridingMethodfrom FunctionValue
neverReturns

Holds if this callable never returns once called. For example, sys.exit

from CallableValue
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