Module Flow

Import path

semmle.python.Flow

Imports

Classes

AttrNode

A control flow corresponding to an attribute expression, such as value.attr

BasicBlock

A basic block (ignoring exceptional flow edges to scope exit)

BinaryExprNode

A control flow node corresponding to a binary expression, such as x + y

BoolExprNode

A control flow node corresponding to a boolean shortcut (and/or) operation

CallNode

A control flow node corresponding to a call expression, such as func(...)

CompareNode

A control flow node corresponding to a comparison operation, such as x<y

ControlFlowNode

A control flow node. Control flow nodes have a many-to-one relation with syntactic nodes, although most syntactic nodes have only one corresponding control flow node. Edges between control flow nodes include exceptional as well as normal control flow.

DefinitionNode

A control flow node corresponding to a definition, that is a control flow node where a value is assigned to this node. Includes control flow nodes for the targets of assignments, simple or augmented, and nodes implicitly assigned in class and function definitions and imports.

DeletionNode

A control flow node corresponding to a deletion statement, such as del x. There can be multiple DeletionNodes for each Delete such that each target has own DeletionNode. The CFG for del a, x.y looks like: NameNode('a') -> DeletionNode -> NameNode('b') -> AttrNode('y') -> DeletionNode.

DictNode

A control flow node corresponding to a dictionary literal, such as { 'a': 1, 'b': 2 }

ForNode

A flow node for a for statement.

IfExprNode

A control flow node corresponding to a conditional expression such as, body if test else orelse

ImportExprNode

A control flow node corresponding to an artificial expression representing an import

ImportMemberNode

A control flow node corresponding to a from ... import ... expression

ImportStarNode

A control flow node corresponding to a from ... import * statement

ListNode

A control flow node corresponding to a list expression, such as [ 1, 3, 5, 7, 9 ]

RaiseStmtNode

A flow node for a raise statement

SequenceNode

A control flow node corresponding to a sequence (tuple or list) literal

SetNode
SubscriptNode

A control flow node corresponding to a subscript expression, such as value[slice]

TupleNode

A control flow node corresponding to a tuple expression such as ( 1, 3, 5, 7, 9 )

UnaryExprNode

A control flow node corresponding to a unary expression: (+x), (-x) or (~x)