package documentation
(source)

Every available node class.

All nodes inherit from ~astroid.nodes.node_classes.NodeNG.

Package scoped​_nodes This module contains all classes that are considered a "scoped" node and anything related. A scope node is a node that opens a new local scope in the language definition: Module, ClassDef, FunctionDef (and Lambda, GeneratorExp, DictComp and SetComp to some extent).
Module as​_string This module renders Astroid nodes as string
Module const Undocumented
Module node​_classes Module for some node classes. More nodes in scoped_nodes.py
Module node​_ng Undocumented

From __init__.py:

Class ​Ann​Assign Class representing an ast.AnnAssign node.
Class ​Arguments Class representing an ast.arguments node.
Class ​Assert Class representing an ast.Assert node.
Class ​Assign Class representing an ast.Assign node.
Class ​Assign​Attr Variation of ast.Assign representing assignment to an attribute.
Class ​Assign​Name Variation of ast.Assign representing assignment to a name.
Class ​Async​For Class representing an ast.AsyncFor node.
Class ​Async​With Asynchronous with built with the async keyword.
Class ​Attribute Class representing an ast.Attribute node.
Class ​Aug​Assign Class representing an ast.AugAssign node.
Class ​Await Class representing an ast.Await node.
Class ​Bin​Op Class representing an ast.BinOp node.
Class ​Bool​Op Class representing an ast.BoolOp node.
Class ​Break Class representing an ast.Break node.
Class ​Call Class representing an ast.Call node.
Class ​Compare Class representing an ast.Compare node.
Class ​Comprehension Class representing an ast.comprehension node.
Class ​Const Class representing any constant including num, str, bool, None, bytes.
Class ​Continue Class representing an ast.Continue node.
Class ​Decorators A node representing a list of decorators.
Class ​Del​Attr Variation of ast.Delete representing deletion of an attribute.
Class ​Delete Class representing an ast.Delete node.
Class ​Del​Name Variation of ast.Delete representing deletion of a name.
Class ​Dict Class representing an ast.Dict node.
Class ​Dict​Unpack Represents the unpacking of dicts into dicts using PEP 448.
Class ​Ellipsis Class representing an ast.Ellipsis node.
Class ​Empty​Node Holds an arbitrary object in the LocalsDictNodeNG.locals.
Class ​Evaluated​Object Contains an object that has already been inferred
Class ​Except​Handler Class representing an ast.ExceptHandler. node.
Class ​Expr Class representing an ast.Expr node.
Class ​Ext​Slice Class representing an ast.ExtSlice node.
Class ​For Class representing an ast.For node.
Class ​Formatted​Value Class representing an ast.FormattedValue node.
Class ​Global Class representing an ast.Global node.
Class ​If Class representing an ast.If node.
Class ​If​Exp No summary
Class ​Import No summary
Class ​Import​From Class representing an ast.ImportFrom node.
Class ​Index Class representing an ast.Index node.
Class ​Joined​Str Represents a list of string expressions to be joined.
Class ​Keyword Class representing an ast.keyword node.
Class ​List Class representing an ast.List node.
Class ​Match Class representing a ast.Match node.
Class ​Match​As Class representing a ast.MatchAs node.
Class ​Match​Case Class representing a ast.match_case node.
Class ​Match​Class Class representing a ast.MatchClass node.
Class ​Match​Mapping Class representing a ast.MatchMapping node.
Class ​Match​Or Class representing a ast.MatchOr node.
Class ​Match​Sequence Class representing a ast.MatchSequence node.
Class ​Match​Singleton Class representing a ast.MatchSingleton node.
Class ​Match​Star Class representing a ast.MatchStar node.
Class ​Match​Value Class representing a ast.MatchValue node.
Class ​Name Class representing an ast.Name node.
Class ​Named​Expr Represents the assignment from the assignment expression
Class ​Node​NG A node of the new Abstract Syntax Tree (AST).
Class ​Nonlocal Class representing an ast.Nonlocal node.
Class ​Pass Class representing an ast.Pass node.
Class ​Raise Class representing an ast.Raise node.
Class ​Return Class representing an ast.Return node.
Class ​Set Class representing an ast.Set node.
Class ​Slice Class representing an ast.Slice node.
Class ​Starred Class representing an ast.Starred node.
Class ​Statement Statement node adding a few attributes
Class ​Subscript Class representing an ast.Subscript node.
Class ​Try​Except Class representing an ast.TryExcept node.
Class ​Try​Finally Class representing an ast.TryFinally node.
Class ​Tuple Class representing an ast.Tuple node.
Class ​Unary​Op Class representing an ast.UnaryOp node.
Class ​Unknown No summary
Class ​While Class representing an ast.While node.
Class ​With Class representing an ast.With node.
Class ​Yield Class representing an ast.Yield node.
Class ​Yield​From Class representing an ast.YieldFrom node.
Function are​_exclusive return true if the two given statements are mutually exclusive
Function const​_factory return an astroid node for a python value
Function unpack​_infer recursively generate nodes inferred by the given statement. If the inferred value is a list or a tuple, recurse on the elements
Constant ALL​_NODE​_CLASSES Undocumented
Constant CONST​_CLS Undocumented
CONST_CLS = (source)

Undocumented

Value
{list: List,
 tuple: Tuple,
 dict: Dict,
 set: Set,
 type(None): Const,
 type(NotImplemented): Const,
 type(...): Const}
def are_exclusive(stmt1, stmt2, exceptions=None): (source)

return true if the two given statements are mutually exclusive

exceptions may be a list of exception names. If specified, discard If branches and check one of the statement is in an exception handler catching one of the given exceptions.

algorithm :
  1. index stmt1's parents
  2. climb among stmt2's parents until we find a common parent
  3. if the common parent is a If or TryExcept statement, look if nodes are in exclusive branches
Parameters
stmt1Undocumented
stmt2Undocumented
exceptions:Optional[typing.List[str]]Undocumented
Returns
boolUndocumented
def const_factory(value): (source)
return an astroid node for a python value
@decorators.raise_if_nothing_inferred
def unpack_infer(stmt, context=None): (source)
recursively generate nodes inferred by the given statement. If the inferred value is a list or a tuple, recurse on the elements
ALL_NODE_CLASSES = (source)