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

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

7 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 Interpolation, 

54 JoinedStr, 

55 Keyword, 

56 List, 

57 Match, 

58 MatchAs, 

59 MatchCase, 

60 MatchClass, 

61 MatchMapping, 

62 MatchOr, 

63 MatchSequence, 

64 MatchSingleton, 

65 MatchStar, 

66 MatchValue, 

67 Name, 

68 NamedExpr, 

69 NodeNG, 

70 Nonlocal, 

71 ParamSpec, 

72 Pass, 

73 Pattern, 

74 Raise, 

75 Return, 

76 Set, 

77 Slice, 

78 Starred, 

79 Subscript, 

80 TemplateStr, 

81 Try, 

82 TryStar, 

83 Tuple, 

84 TypeAlias, 

85 TypeVar, 

86 TypeVarTuple, 

87 UnaryOp, 

88 Unknown, 

89 While, 

90 With, 

91 Yield, 

92 YieldFrom, 

93 are_exclusive, 

94 const_factory, 

95 unpack_infer, 

96) 

97from astroid.nodes.scoped_nodes import ( 

98 SYNTHETIC_ROOT, 

99 AsyncFunctionDef, 

100 ClassDef, 

101 ComprehensionScope, 

102 DictComp, 

103 FunctionDef, 

104 GeneratorExp, 

105 Lambda, 

106 ListComp, 

107 LocalsDictNodeNG, 

108 Module, 

109 SetComp, 

110 builtin_lookup, 

111 function_to_method, 

112 get_wrapping_class, 

113) 

114from astroid.nodes.utils import Position 

115 

116ALL_NODE_CLASSES = ( 

117 BaseContainer, 

118 AnnAssign, 

119 Arguments, 

120 Assert, 

121 Assign, 

122 AssignAttr, 

123 AssignName, 

124 AsyncFor, 

125 AsyncFunctionDef, 

126 AsyncWith, 

127 Attribute, 

128 AugAssign, 

129 Await, 

130 BinOp, 

131 BoolOp, 

132 Break, 

133 Call, 

134 ClassDef, 

135 Compare, 

136 Comprehension, 

137 ComprehensionScope, 

138 Const, 

139 const_factory, 

140 Continue, 

141 Decorators, 

142 DelAttr, 

143 Delete, 

144 DelName, 

145 Dict, 

146 DictComp, 

147 DictUnpack, 

148 EmptyNode, 

149 EvaluatedObject, 

150 ExceptHandler, 

151 Expr, 

152 For, 

153 FormattedValue, 

154 FunctionDef, 

155 GeneratorExp, 

156 Global, 

157 If, 

158 IfExp, 

159 Import, 

160 ImportFrom, 

161 JoinedStr, 

162 Keyword, 

163 Lambda, 

164 List, 

165 ListComp, 

166 LocalsDictNodeNG, 

167 Match, 

168 MatchAs, 

169 MatchCase, 

170 MatchClass, 

171 MatchMapping, 

172 MatchOr, 

173 MatchSequence, 

174 MatchSingleton, 

175 MatchStar, 

176 MatchValue, 

177 Module, 

178 Name, 

179 NamedExpr, 

180 NodeNG, 

181 Nonlocal, 

182 ParamSpec, 

183 Pass, 

184 Pattern, 

185 Raise, 

186 Return, 

187 Set, 

188 SetComp, 

189 Slice, 

190 Starred, 

191 Subscript, 

192 Try, 

193 TryStar, 

194 Tuple, 

195 TypeAlias, 

196 TypeVar, 

197 TypeVarTuple, 

198 UnaryOp, 

199 Unknown, 

200 While, 

201 With, 

202 Yield, 

203 YieldFrom, 

204) 

205 

206__all__ = ( 

207 "CONST_CLS", 

208 "SYNTHETIC_ROOT", 

209 "AnnAssign", 

210 "Arguments", 

211 "Assert", 

212 "Assign", 

213 "AssignAttr", 

214 "AssignName", 

215 "AsyncFor", 

216 "AsyncFunctionDef", 

217 "AsyncWith", 

218 "Attribute", 

219 "AugAssign", 

220 "Await", 

221 "BaseContainer", 

222 "BinOp", 

223 "BoolOp", 

224 "Break", 

225 "Call", 

226 "ClassDef", 

227 "Compare", 

228 "Comprehension", 

229 "ComprehensionScope", 

230 "Const", 

231 "Continue", 

232 "Decorators", 

233 "DelAttr", 

234 "DelName", 

235 "Delete", 

236 "Dict", 

237 "DictComp", 

238 "DictUnpack", 

239 "EmptyNode", 

240 "EvaluatedObject", 

241 "ExceptHandler", 

242 "Expr", 

243 "For", 

244 "FormattedValue", 

245 "FunctionDef", 

246 "GeneratorExp", 

247 "Global", 

248 "If", 

249 "IfExp", 

250 "Import", 

251 "ImportFrom", 

252 "Interpolation", 

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

285 "Try", 

286 "TryStar", 

287 "Tuple", 

288 "TypeAlias", 

289 "TypeVar", 

290 "TypeVarTuple", 

291 "UnaryOp", 

292 "Unknown", 

293 "While", 

294 "With", 

295 "Yield", 

296 "YieldFrom", 

297 "are_exclusive", 

298 "builtin_lookup", 

299 "const_factory", 

300 "function_to_method", 

301 "get_wrapping_class", 

302 "unpack_infer", 

303)