3 from typing import Any, Optional, Union
\r
5 PyCF_ONLY_AST = ... # type: int
\r
10 _attributes = ... # type: typing.Tuple[str, ...]
\r
11 _fields = ... # type: typing.Tuple[str, ...]
\r
12 def __init__(self, *args: Any, **kwargs: Any) -> None: ...
\r
18 body = ... # type: typing.List[stmt]
\r
19 if sys.version_info >= (3, 7):
\r
20 docstring: Optional[str]
\r
22 class Interactive(mod):
\r
23 body = ... # type: typing.List[stmt]
\r
25 class Expression(mod):
\r
26 body = ... # type: expr
\r
29 body = ... # type: typing.List[stmt]
\r
33 lineno = ... # type: int
\r
34 col_offset = ... # type: int
\r
36 class FunctionDef(stmt):
\r
37 name = ... # type: _identifier
\r
38 args = ... # type: arguments
\r
39 body = ... # type: typing.List[stmt]
\r
40 decorator_list = ... # type: typing.List[expr]
\r
41 returns = ... # type: Optional[expr]
\r
42 if sys.version_info >= (3, 7):
\r
43 docstring: Optional[str]
\r
45 class AsyncFunctionDef(stmt):
\r
46 name = ... # type: _identifier
\r
47 args = ... # type: arguments
\r
48 body = ... # type: typing.List[stmt]
\r
49 decorator_list = ... # type: typing.List[expr]
\r
50 returns = ... # type: Optional[expr]
\r
51 if sys.version_info >= (3, 7):
\r
52 docstring: Optional[str]
\r
54 class ClassDef(stmt):
\r
55 name = ... # type: _identifier
\r
56 bases = ... # type: typing.List[expr]
\r
57 keywords = ... # type: typing.List[keyword]
\r
58 body = ... # type: typing.List[stmt]
\r
59 decorator_list = ... # type: typing.List[expr]
\r
60 if sys.version_info >= (3, 7):
\r
61 docstring: Optional[str]
\r
64 value = ... # type: Optional[expr]
\r
67 targets = ... # type: typing.List[expr]
\r
70 targets = ... # type: typing.List[expr]
\r
71 value = ... # type: expr
\r
73 class AugAssign(stmt):
\r
74 target = ... # type: expr
\r
75 op = ... # type: operator
\r
76 value = ... # type: expr
\r
78 if sys.version_info >= (3, 6):
\r
79 class AnnAssign(stmt):
\r
80 target = ... # type: expr
\r
81 annotation = ... # type: expr
\r
82 value = ... # type: Optional[expr]
\r
83 simple = ... # type: int
\r
86 target = ... # type: expr
\r
87 iter = ... # type: expr
\r
88 body = ... # type: typing.List[stmt]
\r
89 orelse = ... # type: typing.List[stmt]
\r
91 class AsyncFor(stmt):
\r
92 target = ... # type: expr
\r
93 iter = ... # type: expr
\r
94 body = ... # type: typing.List[stmt]
\r
95 orelse = ... # type: typing.List[stmt]
\r
98 test = ... # type: expr
\r
99 body = ... # type: typing.List[stmt]
\r
100 orelse = ... # type: typing.List[stmt]
\r
103 test = ... # type: expr
\r
104 body = ... # type: typing.List[stmt]
\r
105 orelse = ... # type: typing.List[stmt]
\r
108 items = ... # type: typing.List[withitem]
\r
109 body = ... # type: typing.List[stmt]
\r
111 class AsyncWith(stmt):
\r
112 items = ... # type: typing.List[withitem]
\r
113 body = ... # type: typing.List[stmt]
\r
116 exc = ... # type: Optional[expr]
\r
117 cause = ... # type: Optional[expr]
\r
120 body = ... # type: typing.List[stmt]
\r
121 handlers = ... # type: typing.List[ExceptHandler]
\r
122 orelse = ... # type: typing.List[stmt]
\r
123 finalbody = ... # type: typing.List[stmt]
\r
125 class Assert(stmt):
\r
126 test = ... # type: expr
\r
127 msg = ... # type: Optional[expr]
\r
129 class Import(stmt):
\r
130 names = ... # type: typing.List[alias]
\r
132 class ImportFrom(stmt):
\r
133 module = ... # type: Optional[_identifier]
\r
134 names = ... # type: typing.List[alias]
\r
135 level = ... # type: Optional[int]
\r
137 class Global(stmt):
\r
138 names = ... # type: typing.List[_identifier]
\r
140 class Nonlocal(stmt):
\r
141 names = ... # type: typing.List[_identifier]
\r
144 value = ... # type: expr
\r
146 class Pass(stmt): ...
\r
147 class Break(stmt): ...
\r
148 class Continue(stmt): ...
\r
154 _slice = slice # this lets us type the variable named 'slice' below
\r
156 class Slice(slice):
\r
157 lower = ... # type: Optional[expr]
\r
158 upper = ... # type: Optional[expr]
\r
159 step = ... # type: Optional[expr]
\r
161 class ExtSlice(slice):
\r
162 dims = ... # type: typing.List[slice]
\r
164 class Index(slice):
\r
165 value = ... # type: expr
\r
169 lineno = ... # type: int
\r
170 col_offset = ... # type: int
\r
172 class BoolOp(expr):
\r
173 op = ... # type: boolop
\r
174 values = ... # type: typing.List[expr]
\r
177 left = ... # type: expr
\r
178 op = ... # type: operator
\r
179 right = ... # type: expr
\r
181 class UnaryOp(expr):
\r
182 op = ... # type: unaryop
\r
183 operand = ... # type: expr
\r
185 class Lambda(expr):
\r
186 args = ... # type: arguments
\r
187 body = ... # type: expr
\r
190 test = ... # type: expr
\r
191 body = ... # type: expr
\r
192 orelse = ... # type: expr
\r
195 keys = ... # type: typing.List[expr]
\r
196 values = ... # type: typing.List[expr]
\r
199 elts = ... # type: typing.List[expr]
\r
201 class ListComp(expr):
\r
202 elt = ... # type: expr
\r
203 generators = ... # type: typing.List[comprehension]
\r
205 class SetComp(expr):
\r
206 elt = ... # type: expr
\r
207 generators = ... # type: typing.List[comprehension]
\r
209 class DictComp(expr):
\r
210 key = ... # type: expr
\r
211 value = ... # type: expr
\r
212 generators = ... # type: typing.List[comprehension]
\r
214 class GeneratorExp(expr):
\r
215 elt = ... # type: expr
\r
216 generators = ... # type: typing.List[comprehension]
\r
219 value = ... # type: expr
\r
222 value = ... # type: Optional[expr]
\r
224 class YieldFrom(expr):
\r
225 value = ... # type: expr
\r
227 class Compare(expr):
\r
228 left = ... # type: expr
\r
229 ops = ... # type: typing.List[cmpop]
\r
230 comparators = ... # type: typing.List[expr]
\r
233 func = ... # type: expr
\r
234 args = ... # type: typing.List[expr]
\r
235 keywords = ... # type: typing.List[keyword]
\r
238 n = ... # type: Union[int, float]
\r
241 s = ... # type: str
\r
243 if sys.version_info >= (3, 6):
\r
244 class FormattedValue(expr):
\r
245 value = ... # type: expr
\r
246 conversion = ... # type: Optional[int]
\r
247 format_spec = ... # type: Optional[expr]
\r
249 class JoinedStr(expr):
\r
250 values = ... # type: typing.List[expr]
\r
253 s = ... # type: bytes
\r
255 class NameConstant(expr):
\r
256 value = ... # type: Any
\r
258 class Ellipsis(expr): ...
\r
260 class Attribute(expr):
\r
261 value = ... # type: expr
\r
262 attr = ... # type: _identifier
\r
263 ctx = ... # type: expr_context
\r
265 class Subscript(expr):
\r
266 value = ... # type: expr
\r
267 slice = ... # type: _slice
\r
268 ctx = ... # type: expr_context
\r
270 class Starred(expr):
\r
271 value = ... # type: expr
\r
272 ctx = ... # type: expr_context
\r
275 id = ... # type: _identifier
\r
276 ctx = ... # type: expr_context
\r
279 elts = ... # type: typing.List[expr]
\r
280 ctx = ... # type: expr_context
\r
283 elts = ... # type: typing.List[expr]
\r
284 ctx = ... # type: expr_context
\r
287 class expr_context(AST):
\r
290 class AugLoad(expr_context): ...
\r
291 class AugStore(expr_context): ...
\r
292 class Del(expr_context): ...
\r
293 class Load(expr_context): ...
\r
294 class Param(expr_context): ...
\r
295 class Store(expr_context): ...
\r
301 class And(boolop): ...
\r
302 class Or(boolop): ...
\r
304 class operator(AST):
\r
307 class Add(operator): ...
\r
308 class BitAnd(operator): ...
\r
309 class BitOr(operator): ...
\r
310 class BitXor(operator): ...
\r
311 class Div(operator): ...
\r
312 class FloorDiv(operator): ...
\r
313 class LShift(operator): ...
\r
314 class Mod(operator): ...
\r
315 class Mult(operator): ...
\r
316 class MatMult(operator): ...
\r
317 class Pow(operator): ...
\r
318 class RShift(operator): ...
\r
319 class Sub(operator): ...
\r
321 class unaryop(AST):
\r
324 class Invert(unaryop): ...
\r
325 class Not(unaryop): ...
\r
326 class UAdd(unaryop): ...
\r
327 class USub(unaryop): ...
\r
332 class Eq(cmpop): ...
\r
333 class Gt(cmpop): ...
\r
334 class GtE(cmpop): ...
\r
335 class In(cmpop): ...
\r
336 class Is(cmpop): ...
\r
337 class IsNot(cmpop): ...
\r
338 class Lt(cmpop): ...
\r
339 class LtE(cmpop): ...
\r
340 class NotEq(cmpop): ...
\r
341 class NotIn(cmpop): ...
\r
344 class comprehension(AST):
\r
345 target = ... # type: expr
\r
346 iter = ... # type: expr
\r
347 ifs = ... # type: typing.List[expr]
\r
348 if sys.version_info >= (3, 6):
\r
349 is_async = ... # type: int
\r
352 class ExceptHandler(AST):
\r
353 type = ... # type: Optional[expr]
\r
354 name = ... # type: Optional[_identifier]
\r
355 body = ... # type: typing.List[stmt]
\r
356 lineno = ... # type: int
\r
357 col_offset = ... # type: int
\r
360 class arguments(AST):
\r
361 args = ... # type: typing.List[arg]
\r
362 vararg = ... # type: Optional[arg]
\r
363 kwonlyargs = ... # type: typing.List[arg]
\r
364 kw_defaults = ... # type: typing.List[expr]
\r
365 kwarg = ... # type: Optional[arg]
\r
366 defaults = ... # type: typing.List[expr]
\r
369 arg = ... # type: _identifier
\r
370 annotation = ... # type: Optional[expr]
\r
371 lineno = ... # type: int
\r
372 col_offset = ... # type: int
\r
374 class keyword(AST):
\r
375 arg = ... # type: Optional[_identifier]
\r
376 value = ... # type: expr
\r
379 name = ... # type: _identifier
\r
380 asname = ... # type: Optional[_identifier]
\r
382 class withitem(AST):
\r
383 context_expr = ... # type: expr
\r
384 optional_vars = ... # type: Optional[expr]
\r