Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nodes.py 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright (c) 2006-2011, 2013 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
  2. # Copyright (c) 2014-2016 Claudiu Popa <pcmanticore@gmail.com>
  3. # Copyright (c) 2014 Google, Inc.
  4. # Copyright (c) 2015-2016 Cara Vinson <ceridwenv@gmail.com>
  5. # Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
  6. # For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
  7. """Every available node class.
  8. .. seealso::
  9. :doc:`ast documentation <green_tree_snakes:nodes>`
  10. All nodes inherit from :class:`~astroid.node_classes.NodeNG`.
  11. """
  12. # pylint: disable=unused-import,redefined-builtin
  13. from astroid.node_classes import (
  14. Arguments, AssignAttr, Assert, Assign, AnnAssign,
  15. AssignName, AugAssign, Repr, BinOp, BoolOp, Break, Call, Compare,
  16. Comprehension, Const, Continue, Decorators, DelAttr, DelName, Delete,
  17. Dict, Expr, Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice, For,
  18. ImportFrom, Attribute, Global, If, IfExp, Import, Index, Keyword,
  19. List, Name, Nonlocal, Pass, Print, Raise, Return, Set, Slice, Starred, Subscript,
  20. TryExcept, TryFinally, Tuple, UnaryOp, While, With, Yield, YieldFrom,
  21. const_factory,
  22. AsyncFor, Await, AsyncWith,
  23. FormattedValue, JoinedStr,
  24. # Backwards-compatibility aliases
  25. Backquote, Discard, AssName, AssAttr, Getattr, CallFunc, From,
  26. # Node not present in the builtin ast module.
  27. DictUnpack,
  28. Unknown,
  29. )
  30. from astroid.scoped_nodes import (
  31. Module, GeneratorExp, Lambda, DictComp,
  32. ListComp, SetComp, FunctionDef, ClassDef,
  33. AsyncFunctionDef,
  34. # Backwards-compatibility aliases
  35. Class, Function, GenExpr,
  36. )
  37. ALL_NODE_CLASSES = (
  38. AsyncFunctionDef, AsyncFor, AsyncWith, Await,
  39. Arguments, AssignAttr, Assert, Assign, AnnAssign, AssignName, AugAssign,
  40. Repr, BinOp, BoolOp, Break,
  41. Call, ClassDef, Compare, Comprehension, Const, Continue,
  42. Decorators, DelAttr, DelName, Delete,
  43. Dict, DictComp, DictUnpack, Expr,
  44. Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice,
  45. For, ImportFrom, FunctionDef,
  46. Attribute, GeneratorExp, Global,
  47. If, IfExp, Import, Index,
  48. Keyword,
  49. Lambda, List, ListComp,
  50. Name, Nonlocal,
  51. Module,
  52. Pass, Print,
  53. Raise, Return,
  54. Set, SetComp, Slice, Starred, Subscript,
  55. TryExcept, TryFinally, Tuple,
  56. UnaryOp,
  57. While, With,
  58. Yield, YieldFrom,
  59. FormattedValue, JoinedStr,
  60. )