Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.10/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 SYNTHETIC_ROOT, 

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 

114ALL_NODE_CLASSES = ( 

115 BaseContainer, 

116 AnnAssign, 

117 Arguments, 

118 Assert, 

119 Assign, 

120 AssignAttr, 

121 AssignName, 

122 AsyncFor, 

123 AsyncFunctionDef, 

124 AsyncWith, 

125 Attribute, 

126 AugAssign, 

127 Await, 

128 BinOp, 

129 BoolOp, 

130 Break, 

131 Call, 

132 ClassDef, 

133 Compare, 

134 Comprehension, 

135 ComprehensionScope, 

136 Const, 

137 const_factory, 

138 Continue, 

139 Decorators, 

140 DelAttr, 

141 Delete, 

142 DelName, 

143 Dict, 

144 DictComp, 

145 DictUnpack, 

146 EmptyNode, 

147 EvaluatedObject, 

148 ExceptHandler, 

149 Expr, 

150 For, 

151 FormattedValue, 

152 FunctionDef, 

153 GeneratorExp, 

154 Global, 

155 If, 

156 IfExp, 

157 Import, 

158 ImportFrom, 

159 JoinedStr, 

160 Keyword, 

161 Lambda, 

162 List, 

163 ListComp, 

164 LocalsDictNodeNG, 

165 Match, 

166 MatchAs, 

167 MatchCase, 

168 MatchClass, 

169 MatchMapping, 

170 MatchOr, 

171 MatchSequence, 

172 MatchSingleton, 

173 MatchStar, 

174 MatchValue, 

175 Module, 

176 Name, 

177 NamedExpr, 

178 NodeNG, 

179 Nonlocal, 

180 ParamSpec, 

181 Pass, 

182 Pattern, 

183 Raise, 

184 Return, 

185 Set, 

186 SetComp, 

187 Slice, 

188 Starred, 

189 Subscript, 

190 Try, 

191 TryStar, 

192 Tuple, 

193 TypeAlias, 

194 TypeVar, 

195 TypeVarTuple, 

196 UnaryOp, 

197 Unknown, 

198 While, 

199 With, 

200 Yield, 

201 YieldFrom, 

202) 

203 

204__all__ = ( 

205 "CONST_CLS", 

206 "SYNTHETIC_ROOT", 

207 "AnnAssign", 

208 "Arguments", 

209 "Assert", 

210 "Assign", 

211 "AssignAttr", 

212 "AssignName", 

213 "AsyncFor", 

214 "AsyncFunctionDef", 

215 "AsyncWith", 

216 "Attribute", 

217 "AugAssign", 

218 "Await", 

219 "BaseContainer", 

220 "BinOp", 

221 "BoolOp", 

222 "Break", 

223 "Call", 

224 "ClassDef", 

225 "Compare", 

226 "Comprehension", 

227 "ComprehensionScope", 

228 "Const", 

229 "Continue", 

230 "Decorators", 

231 "DelAttr", 

232 "DelName", 

233 "Delete", 

234 "Dict", 

235 "DictComp", 

236 "DictUnpack", 

237 "EmptyNode", 

238 "EvaluatedObject", 

239 "ExceptHandler", 

240 "Expr", 

241 "For", 

242 "FormattedValue", 

243 "FunctionDef", 

244 "GeneratorExp", 

245 "Global", 

246 "If", 

247 "IfExp", 

248 "Import", 

249 "ImportFrom", 

250 "JoinedStr", 

251 "Keyword", 

252 "Lambda", 

253 "List", 

254 "ListComp", 

255 "LocalsDictNodeNG", 

256 "Match", 

257 "MatchAs", 

258 "MatchCase", 

259 "MatchClass", 

260 "MatchMapping", 

261 "MatchOr", 

262 "MatchSequence", 

263 "MatchSingleton", 

264 "MatchStar", 

265 "MatchValue", 

266 "Module", 

267 "Name", 

268 "NamedExpr", 

269 "NodeNG", 

270 "Nonlocal", 

271 "ParamSpec", 

272 "Pass", 

273 "Position", 

274 "Raise", 

275 "Return", 

276 "Set", 

277 "SetComp", 

278 "Slice", 

279 "Starred", 

280 "Subscript", 

281 "Try", 

282 "TryStar", 

283 "Tuple", 

284 "TypeAlias", 

285 "TypeVar", 

286 "TypeVarTuple", 

287 "UnaryOp", 

288 "Unknown", 

289 "While", 

290 "With", 

291 "Yield", 

292 "YieldFrom", 

293 "are_exclusive", 

294 "builtin_lookup", 

295 "const_factory", 

296 "function_to_method", 

297 "get_wrapping_class", 

298 "unpack_infer", 

299)