2 from typing import Optional, Union
\r
4 __version__ = ... # type: str
\r
6 PyCF_ONLY_AST = ... # type: int
\r
11 _attributes = ... # type: typing.Tuple[str, ...]
\r
12 _fields = ... # type: typing.Tuple[str, ...]
\r
13 def __init__(self, *args, **kwargs) -> None: ...
\r
19 body = ... # type: typing.List[stmt]
\r
21 class Interactive(mod):
\r
22 body = ... # type: typing.List[stmt]
\r
24 class Expression(mod):
\r
25 body = ... # type: expr
\r
28 body = ... # type: typing.List[stmt]
\r
32 lineno = ... # type: int
\r
33 col_offset = ... # type: int
\r
35 class FunctionDef(stmt):
\r
36 name = ... # type: _identifier
\r
37 args = ... # type: arguments
\r
38 body = ... # type: typing.List[stmt]
\r
39 decorator_list = ... # type: typing.List[expr]
\r
41 class ClassDef(stmt):
\r
42 name = ... # type: _identifier
\r
43 bases = ... # type: typing.List[expr]
\r
44 body = ... # type: typing.List[stmt]
\r
45 decorator_list = ... # type: typing.List[expr]
\r
48 value = ... # type: Optional[expr]
\r
51 targets = ... # type: typing.List[expr]
\r
54 targets = ... # type: typing.List[expr]
\r
55 value = ... # type: expr
\r
57 class AugAssign(stmt):
\r
58 target = ... # type: expr
\r
59 op = ... # type: operator
\r
60 value = ... # type: expr
\r
63 dest = ... # type: Optional[expr]
\r
64 values = ... # type: typing.List[expr]
\r
65 nl = ... # type: bool
\r
68 target = ... # type: expr
\r
69 iter = ... # type: expr
\r
70 body = ... # type: typing.List[stmt]
\r
71 orelse = ... # type: typing.List[stmt]
\r
74 test = ... # type: expr
\r
75 body = ... # type: typing.List[stmt]
\r
76 orelse = ... # type: typing.List[stmt]
\r
79 test = ... # type: expr
\r
80 body = ... # type: typing.List[stmt]
\r
81 orelse = ... # type: typing.List[stmt]
\r
84 context_expr = ... # type: expr
\r
85 optional_vars = ... # type: Optional[expr]
\r
86 body = ... # type: typing.List[stmt]
\r
89 type = ... # type: Optional[expr]
\r
90 inst = ... # type: Optional[expr]
\r
91 tback = ... # type: Optional[expr]
\r
93 class TryExcept(stmt):
\r
94 body = ... # type: typing.List[stmt]
\r
95 handlers = ... # type: typing.List[ExceptHandler]
\r
96 orelse = ... # type: typing.List[stmt]
\r
98 class TryFinally(stmt):
\r
99 body = ... # type: typing.List[stmt]
\r
100 finalbody = ... # type: typing.List[stmt]
\r
102 class Assert(stmt):
\r
103 test = ... # type: expr
\r
104 msg = ... # type: Optional[expr]
\r
106 class Import(stmt):
\r
107 names = ... # type: typing.List[alias]
\r
109 class ImportFrom(stmt):
\r
110 module = ... # type: Optional[_identifier]
\r
111 names = ... # type: typing.List[alias]
\r
112 level = ... # type: Optional[int]
\r
115 body = ... # type: expr
\r
116 globals = ... # type: Optional[expr]
\r
117 locals = ... # type: Optional[expr]
\r
119 class Global(stmt):
\r
120 names = ... # type: typing.List[_identifier]
\r
123 value = ... # type: expr
\r
125 class Pass(stmt): ...
\r
126 class Break(stmt): ...
\r
127 class Continue(stmt): ...
\r
133 _slice = slice # this lets us type the variable named 'slice' below
\r
135 class Slice(slice):
\r
136 lower = ... # type: Optional[expr]
\r
137 upper = ... # type: Optional[expr]
\r
138 step = ... # type: Optional[expr]
\r
140 class ExtSlice(slice):
\r
141 dims = ... # type: typing.List[slice]
\r
143 class Index(slice):
\r
144 value = ... # type: expr
\r
146 class Ellipsis(slice): ...
\r
150 lineno = ... # type: int
\r
151 col_offset = ... # type: int
\r
153 class BoolOp(expr):
\r
154 op = ... # type: boolop
\r
155 values = ... # type: typing.List[expr]
\r
158 left = ... # type: expr
\r
159 op = ... # type: operator
\r
160 right = ... # type: expr
\r
162 class UnaryOp(expr):
\r
163 op = ... # type: unaryop
\r
164 operand = ... # type: expr
\r
166 class Lambda(expr):
\r
167 args = ... # type: arguments
\r
168 body = ... # type: expr
\r
171 test = ... # type: expr
\r
172 body = ... # type: expr
\r
173 orelse = ... # type: expr
\r
176 keys = ... # type: typing.List[expr]
\r
177 values = ... # type: typing.List[expr]
\r
180 elts = ... # type: typing.List[expr]
\r
182 class ListComp(expr):
\r
183 elt = ... # type: expr
\r
184 generators = ... # type: typing.List[comprehension]
\r
186 class SetComp(expr):
\r
187 elt = ... # type: expr
\r
188 generators = ... # type: typing.List[comprehension]
\r
190 class DictComp(expr):
\r
191 key = ... # type: expr
\r
192 value = ... # type: expr
\r
193 generators = ... # type: typing.List[comprehension]
\r
195 class GeneratorExp(expr):
\r
196 elt = ... # type: expr
\r
197 generators = ... # type: typing.List[comprehension]
\r
200 value = ... # type: Optional[expr]
\r
202 class Compare(expr):
\r
203 left = ... # type: expr
\r
204 ops = ... # type: typing.List[cmpop]
\r
205 comparators = ... # type: typing.List[expr]
\r
208 func = ... # type: expr
\r
209 args = ... # type: typing.List[expr]
\r
210 keywords = ... # type: typing.List[keyword]
\r
211 starargs = ... # type: Optional[expr]
\r
212 kwargs = ... # type: Optional[expr]
\r
215 value = ... # type: expr
\r
218 n = ... # type: Union[int, float]
\r
221 s = ... # type: str
\r
223 class Attribute(expr):
\r
224 value = ... # type: expr
\r
225 attr = ... # type: _identifier
\r
226 ctx = ... # type: expr_context
\r
228 class Subscript(expr):
\r
229 value = ... # type: expr
\r
230 slice = ... # type: _slice
\r
231 ctx = ... # type: expr_context
\r
234 id = ... # type: _identifier
\r
235 ctx = ... # type: expr_context
\r
238 elts = ... # type: typing.List[expr]
\r
239 ctx = ... # type: expr_context
\r
242 elts = ... # type: typing.List[expr]
\r
243 ctx = ... # type: expr_context
\r
246 class expr_context(AST):
\r
249 class AugLoad(expr_context): ...
\r
250 class AugStore(expr_context): ...
\r
251 class Del(expr_context): ...
\r
252 class Load(expr_context): ...
\r
253 class Param(expr_context): ...
\r
254 class Store(expr_context): ...
\r
260 class And(boolop): ...
\r
261 class Or(boolop): ...
\r
263 class operator(AST):
\r
266 class Add(operator): ...
\r
267 class BitAnd(operator): ...
\r
268 class BitOr(operator): ...
\r
269 class BitXor(operator): ...
\r
270 class Div(operator): ...
\r
271 class FloorDiv(operator): ...
\r
272 class LShift(operator): ...
\r
273 class Mod(operator): ...
\r
274 class Mult(operator): ...
\r
275 class Pow(operator): ...
\r
276 class RShift(operator): ...
\r
277 class Sub(operator): ...
\r
279 class unaryop(AST):
\r
282 class Invert(unaryop): ...
\r
283 class Not(unaryop): ...
\r
284 class UAdd(unaryop): ...
\r
285 class USub(unaryop): ...
\r
290 class Eq(cmpop): ...
\r
291 class Gt(cmpop): ...
\r
292 class GtE(cmpop): ...
\r
293 class In(cmpop): ...
\r
294 class Is(cmpop): ...
\r
295 class IsNot(cmpop): ...
\r
296 class Lt(cmpop): ...
\r
297 class LtE(cmpop): ...
\r
298 class NotEq(cmpop): ...
\r
299 class NotIn(cmpop): ...
\r
302 class comprehension(AST):
\r
303 target = ... # type: expr
\r
304 iter = ... # type: expr
\r
305 ifs = ... # type: typing.List[expr]
\r
308 class ExceptHandler(AST):
\r
309 type = ... # type: Optional[expr]
\r
310 name = ... # type: Optional[expr]
\r
311 body = ... # type: typing.List[stmt]
\r
312 lineno = ... # type: int
\r
313 col_offset = ... # type: int
\r
316 class arguments(AST):
\r
317 args = ... # type: typing.List[expr]
\r
318 vararg = ... # type: Optional[_identifier]
\r
319 kwarg = ... # type: Optional[_identifier]
\r
320 defaults = ... # type: typing.List[expr]
\r
322 class keyword(AST):
\r
323 arg = ... # type: _identifier
\r
324 value = ... # type: expr
\r
327 name = ... # type: _identifier
\r
328 asname = ... # type: Optional[_identifier]
\r