massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3 / _ast.pyi
1 import sys\r
2 import typing\r
3 from typing import Any, Optional, Union\r
4 \r
5 PyCF_ONLY_AST = ...  # type: int\r
6 \r
7 _identifier = str\r
8 \r
9 class AST:\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
13 \r
14 class mod(AST):\r
15     ...\r
16 \r
17 class Module(mod):\r
18     body = ...  # type: typing.List[stmt]\r
19     if sys.version_info >= (3, 7):\r
20         docstring: Optional[str]\r
21 \r
22 class Interactive(mod):\r
23     body = ...  # type: typing.List[stmt]\r
24 \r
25 class Expression(mod):\r
26     body = ...  # type: expr\r
27 \r
28 class Suite(mod):\r
29     body = ...  # type: typing.List[stmt]\r
30 \r
31 \r
32 class stmt(AST):\r
33     lineno = ...  # type: int\r
34     col_offset = ...  # type: int\r
35 \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
44 \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
53 \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
62 \r
63 class Return(stmt):\r
64     value = ...  # type: Optional[expr]\r
65 \r
66 class Delete(stmt):\r
67     targets = ...  # type: typing.List[expr]\r
68 \r
69 class Assign(stmt):\r
70     targets = ...  # type: typing.List[expr]\r
71     value = ...  # type: expr\r
72 \r
73 class AugAssign(stmt):\r
74     target = ...  # type: expr\r
75     op = ...  # type: operator\r
76     value = ...  # type: expr\r
77 \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
84 \r
85 class For(stmt):\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
90 \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
96 \r
97 class While(stmt):\r
98     test = ...  # type: expr\r
99     body = ...  # type: typing.List[stmt]\r
100     orelse = ...  # type: typing.List[stmt]\r
101 \r
102 class If(stmt):\r
103     test = ...  # type: expr\r
104     body = ...  # type: typing.List[stmt]\r
105     orelse = ...  # type: typing.List[stmt]\r
106 \r
107 class With(stmt):\r
108     items = ...  # type: typing.List[withitem]\r
109     body = ...  # type: typing.List[stmt]\r
110 \r
111 class AsyncWith(stmt):\r
112     items = ...  # type: typing.List[withitem]\r
113     body = ...  # type: typing.List[stmt]\r
114 \r
115 class Raise(stmt):\r
116     exc = ...  # type: Optional[expr]\r
117     cause = ...  # type: Optional[expr]\r
118 \r
119 class Try(stmt):\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
124 \r
125 class Assert(stmt):\r
126     test = ...  # type: expr\r
127     msg = ...  # type: Optional[expr]\r
128 \r
129 class Import(stmt):\r
130     names = ...  # type: typing.List[alias]\r
131 \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
136 \r
137 class Global(stmt):\r
138     names = ...  # type: typing.List[_identifier]\r
139 \r
140 class Nonlocal(stmt):\r
141     names = ...  # type: typing.List[_identifier]\r
142 \r
143 class Expr(stmt):\r
144     value = ...  # type: expr\r
145 \r
146 class Pass(stmt): ...\r
147 class Break(stmt): ...\r
148 class Continue(stmt): ...\r
149 \r
150 \r
151 class slice(AST):\r
152     ...\r
153 \r
154 _slice = slice  # this lets us type the variable named 'slice' below\r
155 \r
156 class Slice(slice):\r
157     lower = ...  # type: Optional[expr]\r
158     upper = ...  # type: Optional[expr]\r
159     step = ...  # type: Optional[expr]\r
160 \r
161 class ExtSlice(slice):\r
162     dims = ...  # type: typing.List[slice]\r
163 \r
164 class Index(slice):\r
165     value = ...  # type: expr\r
166 \r
167 \r
168 class expr(AST):\r
169     lineno = ...  # type: int\r
170     col_offset = ...  # type: int\r
171 \r
172 class BoolOp(expr):\r
173     op = ...  # type: boolop\r
174     values = ...  # type: typing.List[expr]\r
175 \r
176 class BinOp(expr):\r
177     left = ...  # type: expr\r
178     op = ...  # type: operator\r
179     right = ...  # type: expr\r
180 \r
181 class UnaryOp(expr):\r
182     op = ...  # type: unaryop\r
183     operand = ...  # type: expr\r
184 \r
185 class Lambda(expr):\r
186     args = ...  # type: arguments\r
187     body = ...  # type: expr\r
188 \r
189 class IfExp(expr):\r
190     test = ...  # type: expr\r
191     body = ...  # type: expr\r
192     orelse = ...  # type: expr\r
193 \r
194 class Dict(expr):\r
195     keys = ...  # type: typing.List[expr]\r
196     values = ...  # type: typing.List[expr]\r
197 \r
198 class Set(expr):\r
199     elts = ...  # type: typing.List[expr]\r
200 \r
201 class ListComp(expr):\r
202     elt = ...  # type: expr\r
203     generators = ...  # type: typing.List[comprehension]\r
204 \r
205 class SetComp(expr):\r
206     elt = ...  # type: expr\r
207     generators = ...  # type: typing.List[comprehension]\r
208 \r
209 class DictComp(expr):\r
210     key = ...  # type: expr\r
211     value = ...  # type: expr\r
212     generators = ...  # type: typing.List[comprehension]\r
213 \r
214 class GeneratorExp(expr):\r
215     elt = ...  # type: expr\r
216     generators = ...  # type: typing.List[comprehension]\r
217 \r
218 class Await(expr):\r
219     value = ...  # type: expr\r
220 \r
221 class Yield(expr):\r
222     value = ...  # type: Optional[expr]\r
223 \r
224 class YieldFrom(expr):\r
225     value = ...  # type: expr\r
226 \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
231 \r
232 class Call(expr):\r
233     func = ...  # type: expr\r
234     args = ...  # type: typing.List[expr]\r
235     keywords = ...  # type: typing.List[keyword]\r
236 \r
237 class Num(expr):\r
238     n = ...  # type: Union[int, float]\r
239 \r
240 class Str(expr):\r
241     s = ...  # type: str\r
242 \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
248 \r
249     class JoinedStr(expr):\r
250         values = ...  # type: typing.List[expr]\r
251 \r
252 class Bytes(expr):\r
253     s = ...  # type: bytes\r
254 \r
255 class NameConstant(expr):\r
256     value = ...  # type: Any\r
257 \r
258 class Ellipsis(expr): ...\r
259 \r
260 class Attribute(expr):\r
261     value = ...  # type: expr\r
262     attr = ...  # type: _identifier\r
263     ctx = ...  # type: expr_context\r
264 \r
265 class Subscript(expr):\r
266     value = ...  # type: expr\r
267     slice = ...  # type: _slice\r
268     ctx = ...  # type: expr_context\r
269 \r
270 class Starred(expr):\r
271     value = ...  # type: expr\r
272     ctx = ...  # type: expr_context\r
273 \r
274 class Name(expr):\r
275     id = ...  # type: _identifier\r
276     ctx = ...  # type: expr_context\r
277 \r
278 class List(expr):\r
279     elts = ...  # type: typing.List[expr]\r
280     ctx = ...  # type: expr_context\r
281 \r
282 class Tuple(expr):\r
283     elts = ...  # type: typing.List[expr]\r
284     ctx = ...  # type: expr_context\r
285 \r
286 \r
287 class expr_context(AST):\r
288     ...\r
289 \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
296 \r
297 \r
298 class boolop(AST):\r
299     ...\r
300 \r
301 class And(boolop): ...\r
302 class Or(boolop): ...\r
303 \r
304 class operator(AST):\r
305     ...\r
306 \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
320 \r
321 class unaryop(AST):\r
322     ...\r
323 \r
324 class Invert(unaryop): ...\r
325 class Not(unaryop): ...\r
326 class UAdd(unaryop): ...\r
327 class USub(unaryop): ...\r
328 \r
329 class cmpop(AST):\r
330     ...\r
331 \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
342 \r
343 \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
350 \r
351 \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
358 \r
359 \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
367 \r
368 class arg(AST):\r
369     arg = ...  # type: _identifier\r
370     annotation = ...  # type: Optional[expr]\r
371     lineno = ...  # type: int\r
372     col_offset = ...  # type: int\r
373 \r
374 class keyword(AST):\r
375     arg = ...  # type: Optional[_identifier]\r
376     value = ...  # type: expr\r
377 \r
378 class alias(AST):\r
379     name = ...  # type: _identifier\r
380     asname = ...  # type: Optional[_identifier]\r
381 \r
382 class withitem(AST):\r
383     context_expr = ...  # type: expr\r
384     optional_vars = ...  # type: Optional[expr]\r