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

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

6 statements  

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. 

14from astroid.nodes.node_classes import ( 

15 CONST_CLS, 

16 AnnAssign, 

17 Arguments, 

18 Assert, 

19 Assign, 

20 AssignAttr, 

21 AssignName, 

22 AsyncFor, 

23 AsyncWith, 

24 Attribute, 

25 AugAssign, 

26 Await, 

27 BaseContainer, 

28 BinOp, 

29 BoolOp, 

30 Break, 

31 Call, 

32 Compare, 

33 Comprehension, 

34 Const, 

35 Continue, 

36 Decorators, 

37 DelAttr, 

38 Delete, 

39 DelName, 

40 Dict, 

41 DictUnpack, 

42 EmptyNode, 

43 EvaluatedObject, 

44 ExceptHandler, 

45 Expr, 

46 For, 

47 FormattedValue, 

48 Global, 

49 If, 

50 IfExp, 

51 Import, 

52 ImportFrom, 

53 JoinedStr, 

54 Keyword, 

55 List, 

56 Match, 

57 MatchAs, 

58 MatchCase, 

59 MatchClass, 

60 MatchMapping, 

61 MatchOr, 

62 MatchSequence, 

63 MatchSingleton, 

64 MatchStar, 

65 MatchValue, 

66 Name, 

67 NamedExpr, 

68 NodeNG, 

69 Nonlocal, 

70 ParamSpec, 

71 Pass, 

72 Pattern, 

73 Raise, 

74 Return, 

75 Set, 

76 Slice, 

77 Starred, 

78 Subscript, 

79 Try, 

80 TryStar, 

81 Tuple, 

82 TypeAlias, 

83 TypeVar, 

84 TypeVarTuple, 

85 UnaryOp, 

86 Unknown, 

87 While, 

88 With, 

89 Yield, 

90 YieldFrom, 

91 are_exclusive, 

92 const_factory, 

93 unpack_infer, 

94) 

95from astroid.nodes.scoped_nodes import ( 

96 AsyncFunctionDef, 

97 ClassDef, 

98 ComprehensionScope, 

99 DictComp, 

100 FunctionDef, 

101 GeneratorExp, 

102 Lambda, 

103 ListComp, 

104 LocalsDictNodeNG, 

105 Module, 

106 SetComp, 

107 builtin_lookup, 

108 function_to_method, 

109 get_wrapping_class, 

110) 

111from astroid.nodes.utils import Position 

112 

113ALL_NODE_CLASSES = ( 

114 BaseContainer, 

115 AnnAssign, 

116 Arguments, 

117 Assert, 

118 Assign, 

119 AssignAttr, 

120 AssignName, 

121 AsyncFor, 

122 AsyncFunctionDef, 

123 AsyncWith, 

124 Attribute, 

125 AugAssign, 

126 Await, 

127 BinOp, 

128 BoolOp, 

129 Break, 

130 Call, 

131 ClassDef, 

132 Compare, 

133 Comprehension, 

134 ComprehensionScope, 

135 Const, 

136 const_factory, 

137 Continue, 

138 Decorators, 

139 DelAttr, 

140 Delete, 

141 DelName, 

142 Dict, 

143 DictComp, 

144 DictUnpack, 

145 EmptyNode, 

146 EvaluatedObject, 

147 ExceptHandler, 

148 Expr, 

149 For, 

150 FormattedValue, 

151 FunctionDef, 

152 GeneratorExp, 

153 Global, 

154 If, 

155 IfExp, 

156 Import, 

157 ImportFrom, 

158 JoinedStr, 

159 Keyword, 

160 Lambda, 

161 List, 

162 ListComp, 

163 LocalsDictNodeNG, 

164 Match, 

165 MatchAs, 

166 MatchCase, 

167 MatchClass, 

168 MatchMapping, 

169 MatchOr, 

170 MatchSequence, 

171 MatchSingleton, 

172 MatchStar, 

173 MatchValue, 

174 Module, 

175 Name, 

176 NamedExpr, 

177 NodeNG, 

178 Nonlocal, 

179 ParamSpec, 

180 Pass, 

181 Pattern, 

182 Raise, 

183 Return, 

184 Set, 

185 SetComp, 

186 Slice, 

187 Starred, 

188 Subscript, 

189 Try, 

190 TryStar, 

191 Tuple, 

192 TypeAlias, 

193 TypeVar, 

194 TypeVarTuple, 

195 UnaryOp, 

196 Unknown, 

197 While, 

198 With, 

199 Yield, 

200 YieldFrom, 

201) 

202 

203__all__ = ( 

204 "AnnAssign", 

205 "are_exclusive", 

206 "Arguments", 

207 "Assert", 

208 "Assign", 

209 "AssignAttr", 

210 "AssignName", 

211 "AsyncFor", 

212 "AsyncFunctionDef", 

213 "AsyncWith", 

214 "Attribute", 

215 "AugAssign", 

216 "Await", 

217 "BaseContainer", 

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 "ParamSpec", 

275 "Pass", 

276 "Position", 

277 "Raise", 

278 "Return", 

279 "Set", 

280 "SetComp", 

281 "Slice", 

282 "Starred", 

283 "Subscript", 

284 "Try", 

285 "TryStar", 

286 "Tuple", 

287 "TypeAlias", 

288 "TypeVar", 

289 "TypeVarTuple", 

290 "UnaryOp", 

291 "Unknown", 

292 "unpack_infer", 

293 "While", 

294 "With", 

295 "Yield", 

296 "YieldFrom", 

297)