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

Class KeyValuePair

Import path

import python

Direct supertypes

Indirect supertypes

Predicates

getAChildNode

Gets a child node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt().

getScope

Gets the scope that this node occurs in

getValue

Gets the value of this dictionary unpacking.

toString

Inherited predicates

contains

Whether this contains inner syntactically

from AstNode
containsInScope

Whether this contains inner syntactically and inner has the same scope as this

from AstNode
getAFlowNode

DEPRECATED: use ControlFlowNode.getNode() from the other direction instead; that is, replace e.getAFlowNode() = n with n.getNode() = e. This API is being removed to untangle the AST and CFG hierarchies in preparation for migrating the dataflow library off the legacy CFG.

from AstNode
getKey

Gets the key of this key-value pair.

from KeyValuePair_
getLocation

Gets the location of this key-value pair.

from KeyValuePair_
getParent

Gets a parent of this dict_item

from DictItem_
getParentNode

Gets the parent node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt() applied to the parent.

from AstNode
isArtificial

Whether this syntactic element is artificial, that is it is generated by the compiler and is not present in the source

from AstNode