Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(799)

Side by Side Diff: third_party/logilab/astng/nodes.py

Issue 719313003: Revert "pylint: upgrade to 1.3.1" (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/logilab/astng/node_classes.py ('k') | third_party/logilab/astng/protocols.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. 1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr 2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
3 # copyright 2003-2010 Sylvain Thenault, all rights reserved.
4 # contact mailto:thenault@gmail.com
3 # 5 #
4 # This file is part of astroid. 6 # This file is part of logilab-astng.
5 # 7 #
6 # astroid is free software: you can redistribute it and/or modify it 8 # logilab-astng is free software: you can redistribute it and/or modify it
7 # under the terms of the GNU Lesser General Public License as published by the 9 # under the terms of the GNU Lesser General Public License as published by the
8 # Free Software Foundation, either version 2.1 of the License, or (at your 10 # Free Software Foundation, either version 2.1 of the License, or (at your
9 # option) any later version. 11 # option) any later version.
10 # 12 #
11 # astroid is distributed in the hope that it will be useful, but 13 # logilab-astng is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14 # for more details. 16 # for more details.
15 # 17 #
16 # You should have received a copy of the GNU Lesser General Public License along 18 # You should have received a copy of the GNU Lesser General Public License along
17 # with astroid. If not, see <http://www.gnu.org/licenses/>. 19 # with logilab-astng. If not, see <http://www.gnu.org/licenses/>.
18 """ 20 """
19 on all nodes : 21 on all nodes :
20 .is_statement, returning true if the node should be considered as a 22 .is_statement, returning true if the node should be considered as a
21 statement node 23 statement node
22 .root(), returning the root node of the tree (i.e. a Module) 24 .root(), returning the root node of the tree (i.e. a Module)
23 .previous_sibling(), returning previous sibling statement node 25 .previous_sibling(), returning previous sibling statement node
24 .next_sibling(), returning next sibling statement node 26 .next_sibling(), returning next sibling statement node
25 .statement(), returning the first parent node marked as statement node 27 .statement(), returning the first parent node marked as statement node
26 .frame(), returning the first node defining a new local scope (i.e. 28 .frame(), returning the first node defining a new local scope (i.e.
27 Module, Function or Class) 29 Module, Function or Class)
28 .set_local(name, node), define an identifier <name> on the first parent frame, 30 .set_local(name, node), define an identifier <name> on the first parent frame,
29 with the node defining it. This is used by the astroid builder and should not 31 with the node defining it. This is used by the astng builder and should not
30 be used from out there. 32 be used from out there.
31 33
32 on From and Import : 34 on From and Import :
33 .real_name(name), 35 .real_name(name),
34 36
35 37
36 """ 38 """
37 39
38 __docformat__ = "restructuredtext en" 40 __docformat__ = "restructuredtext en"
39 41
40 from astroid.node_classes import Arguments, AssAttr, Assert, Assign, \ 42 from logilab.astng.node_classes import Arguments, AssAttr, Assert, Assign, \
41 AssName, AugAssign, Backquote, BinOp, BoolOp, Break, CallFunc, Compare, \ 43 AssName, AugAssign, Backquote, BinOp, BoolOp, Break, CallFunc, Compare, \
42 Comprehension, Const, Continue, Decorators, DelAttr, DelName, Delete, \ 44 Comprehension, Const, Continue, Decorators, DelAttr, DelName, Delete, \
43 Dict, Discard, Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice, For, \ 45 Dict, Discard, Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice, For, \
44 From, Getattr, Global, If, IfExp, Import, Index, Keyword, \ 46 From, Getattr, Global, If, IfExp, Import, Index, Keyword, \
45 List, Name, Nonlocal, Pass, Print, Raise, Return, Set, Slice, Starred, Subsc ript, \ 47 List, Name, Nonlocal, Pass, Print, Raise, Return, Set, Slice, Starred, Subsc ript, \
46 TryExcept, TryFinally, Tuple, UnaryOp, While, With, Yield, YieldFrom, \ 48 TryExcept, TryFinally, Tuple, UnaryOp, While, With, Yield, \
47 const_factory 49 const_factory
48 from astroid.scoped_nodes import Module, GenExpr, Lambda, DictComp, \ 50 from logilab.astng.scoped_nodes import Module, GenExpr, Lambda, DictComp, \
49 ListComp, SetComp, Function, Class 51 ListComp, SetComp, Function, Class
50 52
51 ALL_NODE_CLASSES = ( 53 ALL_NODE_CLASSES = (
52 Arguments, AssAttr, Assert, Assign, AssName, AugAssign, 54 Arguments, AssAttr, Assert, Assign, AssName, AugAssign,
53 Backquote, BinOp, BoolOp, Break, 55 Backquote, BinOp, BoolOp, Break,
54 CallFunc, Class, Compare, Comprehension, Const, Continue, 56 CallFunc, Class, Compare, Comprehension, Const, Continue,
55 Decorators, DelAttr, DelName, Delete, 57 Decorators, DelAttr, DelName, Delete,
56 Dict, DictComp, Discard, 58 Dict, DictComp, Discard,
57 Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice, 59 Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice,
58 For, From, Function, 60 For, From, Function,
59 Getattr, GenExpr, Global, 61 Getattr, GenExpr, Global,
60 If, IfExp, Import, Index, 62 If, IfExp, Import, Index,
61 Keyword, 63 Keyword,
62 Lambda, List, ListComp, 64 Lambda, List, ListComp,
63 Name, Nonlocal, 65 Name, Nonlocal,
64 Module, 66 Module,
65 Pass, Print, 67 Pass, Print,
66 Raise, Return, 68 Raise, Return,
67 Set, SetComp, Slice, Starred, Subscript, 69 Set, SetComp, Slice, Starred, Subscript,
68 TryExcept, TryFinally, Tuple, 70 TryExcept, TryFinally, Tuple,
69 UnaryOp, 71 UnaryOp,
70 While, With, 72 While, With,
71 Yield, YieldFrom 73 Yield,
72 ) 74 )
73 75
OLDNEW
« no previous file with comments | « third_party/logilab/astng/node_classes.py ('k') | third_party/logilab/astng/protocols.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698