nodes.py 2.89 KB
Newer Older
Stelios Karozis's avatar
Stelios Karozis committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
# Copyright (c) 2006-2011, 2013 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2010 Daniel Harding <dharding@gmail.com>
# Copyright (c) 2014-2018 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Google, Inc.
# Copyright (c) 2015-2016 Ceridwen <ceridwenv@gmail.com>
# Copyright (c) 2016 Jared Garst <jgarst@users.noreply.github.com>
# Copyright (c) 2017 Ashley Whetter <ashley@awhetter.co.uk>
# Copyright (c) 2017 rr- <rr-@sakuya.pl>
# Copyright (c) 2018 Bryce Guinta <bryce.paul.guinta@gmail.com>

# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER

"""Every available node class.

.. seealso::
    :doc:`ast documentation <green_tree_snakes:nodes>`

All nodes inherit from :class:`~astroid.node_classes.NodeNG`.
"""
# pylint: disable=unused-import,redefined-builtin

from astroid.node_classes import (
    Arguments,
    AssignAttr,
    Assert,
    Assign,
    AnnAssign,
    AssignName,
    AugAssign,
    Repr,
    BinOp,
    BoolOp,
    Break,
    Call,
    Compare,
    Comprehension,
    Const,
    Continue,
    Decorators,
    DelAttr,
    DelName,
    Delete,
    Dict,
    Expr,
    Ellipsis,
    EmptyNode,
    ExceptHandler,
    Exec,
    ExtSlice,
    For,
    ImportFrom,
    Attribute,
    Global,
    If,
    IfExp,
    Import,
    Index,
    Keyword,
    List,
    Name,
    NamedExpr,
    Nonlocal,
    Pass,
    Print,
    Raise,
    Return,
    Set,
    Slice,
    Starred,
    Subscript,
    TryExcept,
    TryFinally,
    Tuple,
    UnaryOp,
    While,
    With,
    Yield,
    YieldFrom,
    const_factory,
    AsyncFor,
    Await,
    AsyncWith,
    FormattedValue,
    JoinedStr,
    # Node not present in the builtin ast module.
    DictUnpack,
    Unknown,
)
from astroid.scoped_nodes import (
    Module,
    GeneratorExp,
    Lambda,
    DictComp,
    ListComp,
    SetComp,
    FunctionDef,
    ClassDef,
    AsyncFunctionDef,
)


ALL_NODE_CLASSES = (
    AsyncFunctionDef,
    AsyncFor,
    AsyncWith,
    Await,
    Arguments,
    AssignAttr,
    Assert,
    Assign,
    AnnAssign,
    AssignName,
    AugAssign,
    Repr,
    BinOp,
    BoolOp,
    Break,
    Call,
    ClassDef,
    Compare,
    Comprehension,
    Const,
    Continue,
    Decorators,
    DelAttr,
    DelName,
    Delete,
    Dict,
    DictComp,
    DictUnpack,
    Expr,
    Ellipsis,
    EmptyNode,
    ExceptHandler,
    Exec,
    ExtSlice,
    For,
    ImportFrom,
    FunctionDef,
    Attribute,
    GeneratorExp,
    Global,
    If,
    IfExp,
    Import,
    Index,
    Keyword,
    Lambda,
    List,
    ListComp,
    Name,
    NamedExpr,
    Nonlocal,
    Module,
    Pass,
    Print,
    Raise,
    Return,
    Set,
    SetComp,
    Slice,
    Starred,
    Subscript,
    TryExcept,
    TryFinally,
    Tuple,
    UnaryOp,
    While,
    With,
    Yield,
    YieldFrom,
    FormattedValue,
    JoinedStr,
)