Every available node class. .. seealso:: :doc:`ast documentation <green_tree_snakes:nodes>` All nodes inherit from :class:`~astroid.nodes.node_classes.NodeNG`.
Module | as |
This module renders Astroid nodes as string |
Module | const |
Undocumented |
Module | node |
Module for some node classes. More nodes in scoped_nodes.py |
Module | node |
Undocumented |
Package | scoped |
This module contains all classes that are considered a "scoped" node and anything related. |
Module | utils |
Undocumented |
Module | _base |
This module contains some base nodes that can be inherited for the different nodes. |
From __init__.py
:
Class |
|
Class representing an :class:`ast.AnnAssign` node. |
Class |
|
Class representing an :class:`ast.arguments` node. |
Class |
|
Class representing an :class:`ast.Assert` node. |
Class |
|
Class representing an :class:`ast.Assign` node. |
Class |
|
Variation of :class:`ast.Assign` representing assignment to an attribute. |
Class |
|
Variation of :class:`ast.Assign` representing assignment to a name. |
Class |
|
Class representing an :class:`ast.AsyncFor` node. |
Class |
|
Asynchronous ``with`` built with the ``async`` keyword. |
Class |
|
Class representing an :class:`ast.Attribute` node. |
Class |
|
Class representing an :class:`ast.AugAssign` node. |
Class |
|
Class representing an :class:`ast.Await` node. |
Class |
|
Class representing an :class:`ast.BinOp` node. |
Class |
|
Class representing an :class:`ast.BoolOp` node. |
Class |
|
Class representing an :class:`ast.Break` node. |
Class |
|
Class representing an :class:`ast.Call` node. |
Class |
|
Class representing an :class:`ast.Compare` node. |
Class |
|
Class representing an :class:`ast.comprehension` node. |
Class |
|
Class representing any constant including num, str, bool, None, bytes. |
Class |
|
Class representing an :class:`ast.Continue` node. |
Class |
|
A node representing a list of decorators. |
Class |
|
Variation of :class:`ast.Delete` representing deletion of an attribute. |
Class |
|
Class representing an :class:`ast.Delete` node. |
Class |
|
Variation of :class:`ast.Delete` representing deletion of a name. |
Class |
|
Class representing an :class:`ast.Dict` node. |
Class |
|
Represents the unpacking of dicts into dicts using :pep:`448`. |
Class |
|
Class representing an :class:`ast.Ellipsis` node. |
Class |
|
Holds an arbitrary object in the :attr:`LocalsDictNodeNG.locals`. |
Class |
|
Contains an object that has already been inferred |
Class |
|
Class representing an :class:`ast.ExceptHandler`. node. |
Class |
|
Class representing an :class:`ast.Expr` node. |
Class |
|
Class representing an :class:`ast.ExtSlice` node. |
Class |
|
Class representing an :class:`ast.For` node. |
Class |
|
Class representing an :class:`ast.FormattedValue` node. |
Class |
|
Class representing an :class:`ast.Global` node. |
Class |
|
Class representing an :class:`ast.If` node. |
Class |
|
Class representing an :class:`ast.IfExp` node. >>> import astroid >>> node = astroid.extract_node('value if condition else other') >>> node <IfExp l.1 at 0x7f23b2e9dbe0> |
Class |
|
Class representing an :class:`ast.Import` node. >>> import astroid >>> node = astroid.extract_node('import astroid') >>> node <Import l.1 at 0x7f23b2e4e5c0> |
Class |
|
Class representing an :class:`ast.ImportFrom` node. |
Class |
|
Class representing an :class:`ast.Index` node. |
Class |
|
Represents a list of string expressions to be joined. |
Class |
|
Class representing an :class:`ast.keyword` node. |
Class |
|
Class representing an :class:`ast.List` node. |
Class |
|
Class representing a :class:`ast.Match` node. |
Class |
|
Class representing a :class:`ast.MatchAs` node. |
Class |
|
Class representing a :class:`ast.match_case` node. |
Class |
|
Class representing a :class:`ast.MatchClass` node. |
Class |
|
Class representing a :class:`ast.MatchMapping` node. |
Class |
|
Class representing a :class:`ast.MatchOr` node. |
Class |
|
Class representing a :class:`ast.MatchSequence` node. |
Class |
|
Class representing a :class:`ast.MatchSingleton` node. |
Class |
|
Class representing a :class:`ast.MatchStar` node. |
Class |
|
Class representing a :class:`ast.MatchValue` node. |
Class |
|
Class representing an :class:`ast.Name` node. |
Class |
|
Represents the assignment from the assignment expression |
Class |
|
A node of the new Abstract Syntax Tree (AST). |
Class |
|
Class representing an :class:`ast.Nonlocal` node. |
Class |
|
Class representing an :class:`ast.Pass` node. |
Class |
|
Position with line and column information. |
Class |
|
Class representing an :class:`ast.Raise` node. |
Class |
|
Class representing an :class:`ast.Return` node. |
Class |
|
Class representing an :class:`ast.Set` node. |
Class |
|
Class representing an :class:`ast.Slice` node. |
Class |
|
Class representing an :class:`ast.Starred` node. |
Class |
|
Statement node adding a few attributes. |
Class |
|
Class representing an :class:`ast.Subscript` node. |
Class |
|
Class representing an :class:`ast.TryExcept` node. |
Class |
|
Class representing an :class:`ast.TryFinally` node. |
Class |
|
Class representing an :class:`ast.Tuple` node. |
Class |
|
Class representing an :class:`ast.UnaryOp` node. |
Class |
|
This node represents a node in a constructed AST where introspection is not possible. At the moment, it's only used in the args attribute of FunctionDef nodes where function signature introspection failed. |
Class |
|
Class representing an :class:`ast.While` node. |
Class |
|
Class representing an :class:`ast.With` node. |
Class |
|
Class representing an :class:`ast.Yield` node. |
Class |
|
Class representing an :class:`ast.YieldFrom` node. |
Function | are |
return true if the two given statements are mutually exclusive |
Function | const |
Return an astroid node for a python value. |
Function | unpack |
recursively generate nodes inferred by the given statement. If the inferred value is a list or a tuple, recurse on the elements |
Constant | ALL |
Undocumented |
Constant | CONST |
Undocumented |
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
def unpack_infer(stmt, context:
InferenceContext|None
= None):
(source)
¶
recursively generate nodes inferred by the given statement. If the inferred value is a list or a tuple, recurse on the elements
Undocumented
Value |
|