Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/astroid/nodes/__init__.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-06-07 06:53 +0000

1# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html 

2# For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE 

3# Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt 

4 

5"""Every available node class. 

6 

7.. seealso:: 

8 :doc:`ast documentation <green_tree_snakes:nodes>` 

9 

10All nodes inherit from :class:`~astroid.nodes.node_classes.NodeNG`. 

11""" 

12 

13# Nodes not present in the builtin ast module: DictUnpack, Unknown, and EvaluatedObject. 

14 

15# This is the only node we re-export from the private _base_nodes module. This 

16# is because it was originally part of the public API and hasn't been deprecated. 

17from astroid.nodes._base_nodes import Statement 

18from astroid.nodes.node_classes import ( 

19 CONST_CLS, 

20 AnnAssign, 

21 Arguments, 

22 Assert, 

23 Assign, 

24 AssignAttr, 

25 AssignName, 

26 AsyncFor, 

27 AsyncWith, 

28 Attribute, 

29 AugAssign, 

30 Await, 

31 BaseContainer, 

32 BinOp, 

33 BoolOp, 

34 Break, 

35 Call, 

36 Compare, 

37 Comprehension, 

38 Const, 

39 Continue, 

40 Decorators, 

41 DelAttr, 

42 Delete, 

43 DelName, 

44 Dict, 

45 DictUnpack, 

46 EmptyNode, 

47 EvaluatedObject, 

48 ExceptHandler, 

49 Expr, 

50 For, 

51 FormattedValue, 

52 Global, 

53 If, 

54 IfExp, 

55 Import, 

56 ImportFrom, 

57 JoinedStr, 

58 Keyword, 

59 List, 

60 Match, 

61 MatchAs, 

62 MatchCase, 

63 MatchClass, 

64 MatchMapping, 

65 MatchOr, 

66 MatchSequence, 

67 MatchSingleton, 

68 MatchStar, 

69 MatchValue, 

70 Name, 

71 NamedExpr, 

72 NodeNG, 

73 Nonlocal, 

74 Pass, 

75 Pattern, 

76 Raise, 

77 Return, 

78 Set, 

79 Slice, 

80 Starred, 

81 Subscript, 

82 TryExcept, 

83 TryFinally, 

84 TryStar, 

85 Tuple, 

86 UnaryOp, 

87 Unknown, 

88 While, 

89 With, 

90 Yield, 

91 YieldFrom, 

92 are_exclusive, 

93 const_factory, 

94 unpack_infer, 

95) 

96from astroid.nodes.scoped_nodes import ( 

97 AsyncFunctionDef, 

98 ClassDef, 

99 ComprehensionScope, 

100 DictComp, 

101 FunctionDef, 

102 GeneratorExp, 

103 Lambda, 

104 ListComp, 

105 LocalsDictNodeNG, 

106 Module, 

107 SetComp, 

108 builtin_lookup, 

109 function_to_method, 

110 get_wrapping_class, 

111) 

112from astroid.nodes.utils import Position 

113 

114_BaseContainer = BaseContainer # TODO Remove for astroid 3.0 

115 

116ALL_NODE_CLASSES = ( 

117 _BaseContainer, 

118 BaseContainer, 

119 AnnAssign, 

120 Arguments, 

121 Assert, 

122 Assign, 

123 AssignAttr, 

124 AssignName, 

125 AsyncFor, 

126 AsyncFunctionDef, 

127 AsyncWith, 

128 Attribute, 

129 AugAssign, 

130 Await, 

131 BinOp, 

132 BoolOp, 

133 Break, 

134 Call, 

135 ClassDef, 

136 Compare, 

137 Comprehension, 

138 ComprehensionScope, 

139 Const, 

140 const_factory, 

141 Continue, 

142 Decorators, 

143 DelAttr, 

144 Delete, 

145 DelName, 

146 Dict, 

147 DictComp, 

148 DictUnpack, 

149 EmptyNode, 

150 EvaluatedObject, 

151 ExceptHandler, 

152 Expr, 

153 For, 

154 FormattedValue, 

155 FunctionDef, 

156 GeneratorExp, 

157 Global, 

158 If, 

159 IfExp, 

160 Import, 

161 ImportFrom, 

162 JoinedStr, 

163 Keyword, 

164 Lambda, 

165 List, 

166 ListComp, 

167 LocalsDictNodeNG, 

168 Match, 

169 MatchAs, 

170 MatchCase, 

171 MatchClass, 

172 MatchMapping, 

173 MatchOr, 

174 MatchSequence, 

175 MatchSingleton, 

176 MatchStar, 

177 MatchValue, 

178 Module, 

179 Name, 

180 NamedExpr, 

181 NodeNG, 

182 Nonlocal, 

183 Pass, 

184 Pattern, 

185 Raise, 

186 Return, 

187 Set, 

188 SetComp, 

189 Slice, 

190 Starred, 

191 Subscript, 

192 TryExcept, 

193 TryFinally, 

194 TryStar, 

195 Tuple, 

196 UnaryOp, 

197 Unknown, 

198 While, 

199 With, 

200 Yield, 

201 YieldFrom, 

202) 

203 

204__all__ = ( 

205 "AnnAssign", 

206 "are_exclusive", 

207 "Arguments", 

208 "Assert", 

209 "Assign", 

210 "AssignAttr", 

211 "AssignName", 

212 "AsyncFor", 

213 "AsyncFunctionDef", 

214 "AsyncWith", 

215 "Attribute", 

216 "AugAssign", 

217 "Await", 

218 "BinOp", 

219 "BoolOp", 

220 "Break", 

221 "builtin_lookup", 

222 "Call", 

223 "ClassDef", 

224 "CONST_CLS", 

225 "Compare", 

226 "Comprehension", 

227 "ComprehensionScope", 

228 "Const", 

229 "const_factory", 

230 "Continue", 

231 "Decorators", 

232 "DelAttr", 

233 "Delete", 

234 "DelName", 

235 "Dict", 

236 "DictComp", 

237 "DictUnpack", 

238 "EmptyNode", 

239 "EvaluatedObject", 

240 "ExceptHandler", 

241 "Expr", 

242 "For", 

243 "FormattedValue", 

244 "FunctionDef", 

245 "function_to_method", 

246 "GeneratorExp", 

247 "get_wrapping_class", 

248 "Global", 

249 "If", 

250 "IfExp", 

251 "Import", 

252 "ImportFrom", 

253 "JoinedStr", 

254 "Keyword", 

255 "Lambda", 

256 "List", 

257 "ListComp", 

258 "LocalsDictNodeNG", 

259 "Match", 

260 "MatchAs", 

261 "MatchCase", 

262 "MatchClass", 

263 "MatchMapping", 

264 "MatchOr", 

265 "MatchSequence", 

266 "MatchSingleton", 

267 "MatchStar", 

268 "MatchValue", 

269 "Module", 

270 "Name", 

271 "NamedExpr", 

272 "NodeNG", 

273 "Nonlocal", 

274 "Pass", 

275 "Position", 

276 "Raise", 

277 "Return", 

278 "Set", 

279 "SetComp", 

280 "Slice", 

281 "Starred", 

282 "Statement", 

283 "Subscript", 

284 "TryExcept", 

285 "TryFinally", 

286 "TryStar", 

287 "Tuple", 

288 "UnaryOp", 

289 "Unknown", 

290 "unpack_infer", 

291 "While", 

292 "With", 

293 "Yield", 

294 "YieldFrom", 

295)