massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / third_party / 3 / typed_ast / ast3.pyi
1 import typing\r
2 from typing import Any, Optional, Union, Generic, Iterator\r
3 \r
4 class NodeVisitor():\r
5     def visit(self, node: AST) -> Any: ...\r
6     def generic_visit(self, node: AST) -> None: ...\r
7 \r
8 class NodeTransformer(NodeVisitor):\r
9     def generic_visit(self, node: AST) -> None: ...\r
10 \r
11 def parse(source: Union[str, bytes],\r
12           filename: Union[str, bytes] = ...,\r
13           mode: str = ...,\r
14           feature_version: int = ...) -> AST: ...\r
15 def copy_location(new_node: AST, old_node: AST) -> AST: ...\r
16 def dump(node: AST, annotate_fields: bool = ..., include_attributes: bool = ...) -> str: ...\r
17 def fix_missing_locations(node: AST) -> AST: ...\r
18 def get_docstring(node: AST, clean: bool = ...) -> str: ...\r
19 def increment_lineno(node: AST, n: int = ...) -> AST: ...\r
20 def iter_child_nodes(node: AST) -> Iterator[AST]: ...\r
21 def iter_fields(node: AST) -> Iterator[typing.Tuple[str, Any]]: ...\r
22 def literal_eval(node_or_string: Union[str, AST]) -> Any: ...\r
23 def walk(node: AST) -> Iterator[AST]: ...\r
24 \r
25 PyCF_ONLY_AST = ...  # type: int\r
26 \r
27 # ast classes\r
28 \r
29 identifier = str\r
30 \r
31 class AST:\r
32     _attributes = ...  # type: typing.Tuple[str, ...]\r
33     _fields = ...  # type: typing.Tuple[str, ...]\r
34     def __init__(self, *args, **kwargs) -> None: ...\r
35 \r
36 class mod(AST):\r
37     ...\r
38 \r
39 class Module(mod):\r
40     body = ...  # type: typing.List[stmt]\r
41     type_ignores = ...  # type: typing.List[TypeIgnore]\r
42 \r
43 class Interactive(mod):\r
44     body = ...  # type: typing.List[stmt]\r
45 \r
46 class Expression(mod):\r
47     body = ...  # type: expr\r
48 \r
49 class FunctionType(mod):\r
50     argtypes = ...  # type: typing.List[expr]\r
51     returns = ...  # type: expr\r
52 \r
53 class Suite(mod):\r
54     body = ...  # type: typing.List[stmt]\r
55 \r
56 \r
57 class stmt(AST):\r
58     lineno = ...  # type: int\r
59     col_offset = ...  # type: int\r
60 \r
61 class FunctionDef(stmt):\r
62     name = ...  # type: identifier\r
63     args = ...  # type: arguments\r
64     body = ...  # type: typing.List[stmt]\r
65     decorator_list = ...  # type: typing.List[expr]\r
66     returns = ...  # type: Optional[expr]\r
67     type_comment = ...  # type: Optional[str]\r
68 \r
69 class AsyncFunctionDef(stmt):\r
70     name = ...  # type: identifier\r
71     args = ...  # type: arguments\r
72     body = ...  # type: typing.List[stmt]\r
73     decorator_list = ...  # type: typing.List[expr]\r
74     returns = ...  # type: Optional[expr]\r
75     type_comment = ...  # type: Optional[str]\r
76 \r
77 class ClassDef(stmt):\r
78     name = ...  # type: identifier\r
79     bases = ...  # type: typing.List[expr]\r
80     keywords = ...  # type: typing.List[keyword]\r
81     body = ...  # type: typing.List[stmt]\r
82     decorator_list = ...  # type: typing.List[expr]\r
83 \r
84 class Return(stmt):\r
85     value = ...  # type: Optional[expr]\r
86 \r
87 class Delete(stmt):\r
88     targets = ...  # type: typing.List[expr]\r
89 \r
90 class Assign(stmt):\r
91     targets = ...  # type: typing.List[expr]\r
92     value = ...  # type: expr\r
93     type_comment = ...  # type: Optional[str]\r
94 \r
95 class AugAssign(stmt):\r
96     target = ...  # type: expr\r
97     op = ...  # type: operator\r
98     value = ...  # type: expr\r
99 \r
100 class AnnAssign(stmt):\r
101     target = ...  # type: expr\r
102     annotation = ...  # type: expr\r
103     value = ...  # type: Optional[expr]\r
104     simple = ...  # type: int\r
105 \r
106 class For(stmt):\r
107     target = ...  # type: expr\r
108     iter = ...  # type: expr\r
109     body = ...  # type: typing.List[stmt]\r
110     orelse = ...  # type: typing.List[stmt]\r
111     type_comment = ...  # type: Optional[str]\r
112 \r
113 class AsyncFor(stmt):\r
114     target = ...  # type: expr\r
115     iter = ...  # type: expr\r
116     body = ...  # type: typing.List[stmt]\r
117     orelse = ...  # type: typing.List[stmt]\r
118     type_comment = ...  # type: Optional[str]\r
119 \r
120 class While(stmt):\r
121     test = ...  # type: expr\r
122     body = ...  # type: typing.List[stmt]\r
123     orelse = ...  # type: typing.List[stmt]\r
124 \r
125 class If(stmt):\r
126     test = ...  # type: expr\r
127     body = ...  # type: typing.List[stmt]\r
128     orelse = ...  # type: typing.List[stmt]\r
129 \r
130 class With(stmt):\r
131     items = ...  # type: typing.List[withitem]\r
132     body = ...  # type: typing.List[stmt]\r
133     type_comment = ...  # type: Optional[str]\r
134 \r
135 class AsyncWith(stmt):\r
136     items = ...  # type: typing.List[withitem]\r
137     body = ...  # type: typing.List[stmt]\r
138     type_comment = ...  # type: Optional[str]\r
139 \r
140 class Raise(stmt):\r
141     exc = ...  # type: Optional[expr]\r
142     cause = ...  # type: Optional[expr]\r
143 \r
144 class Try(stmt):\r
145     body = ...  # type: typing.List[stmt]\r
146     handlers = ...  # type: typing.List[ExceptHandler]\r
147     orelse = ...  # type: typing.List[stmt]\r
148     finalbody = ...  # type: typing.List[stmt]\r
149 \r
150 class Assert(stmt):\r
151     test = ...  # type: expr\r
152     msg = ...  # type: Optional[expr]\r
153 \r
154 class Import(stmt):\r
155     names = ...  # type: typing.List[alias]\r
156 \r
157 class ImportFrom(stmt):\r
158     module = ...  # type: Optional[identifier]\r
159     names = ...  # type: typing.List[alias]\r
160     level = ...  # type: Optional[int]\r
161 \r
162 class Global(stmt):\r
163     names = ...  # type: typing.List[identifier]\r
164 \r
165 class Nonlocal(stmt):\r
166     names = ...  # type: typing.List[identifier]\r
167 \r
168 class Expr(stmt):\r
169     value = ...  # type: expr\r
170 \r
171 class Pass(stmt): ...\r
172 class Break(stmt): ...\r
173 class Continue(stmt): ...\r
174 \r
175 \r
176 class slice(AST):\r
177     ...\r
178 \r
179 _slice = slice  # this lets us type the variable named 'slice' below\r
180 \r
181 class Slice(slice):\r
182     lower = ...  # type: Optional[expr]\r
183     upper = ...  # type: Optional[expr]\r
184     step = ...  # type: Optional[expr]\r
185 \r
186 class ExtSlice(slice):\r
187     dims = ...  # type: typing.List[slice]\r
188 \r
189 class Index(slice):\r
190     value = ...  # type: expr\r
191 \r
192 \r
193 class expr(AST):\r
194     lineno = ...  # type: int\r
195     col_offset = ...  # type: int\r
196 \r
197 class BoolOp(expr):\r
198     op = ...  # type: boolop\r
199     values = ...  # type: typing.List[expr]\r
200 \r
201 class BinOp(expr):\r
202     left = ...  # type: expr\r
203     op = ...  # type: operator\r
204     right = ...  # type: expr\r
205 \r
206 class UnaryOp(expr):\r
207     op = ...  # type: unaryop\r
208     operand = ...  # type: expr\r
209 \r
210 class Lambda(expr):\r
211     args = ...  # type: arguments\r
212     body = ...  # type: expr\r
213 \r
214 class IfExp(expr):\r
215     test = ...  # type: expr\r
216     body = ...  # type: expr\r
217     orelse = ...  # type: expr\r
218 \r
219 class Dict(expr):\r
220     keys = ...  # type: typing.List[expr]\r
221     values = ...  # type: typing.List[expr]\r
222 \r
223 class Set(expr):\r
224     elts = ...  # type: typing.List[expr]\r
225 \r
226 class ListComp(expr):\r
227     elt = ...  # type: expr\r
228     generators = ...  # type: typing.List[comprehension]\r
229 \r
230 class SetComp(expr):\r
231     elt = ...  # type: expr\r
232     generators = ...  # type: typing.List[comprehension]\r
233 \r
234 class DictComp(expr):\r
235     key = ...  # type: expr\r
236     value = ...  # type: expr\r
237     generators = ...  # type: typing.List[comprehension]\r
238 \r
239 class GeneratorExp(expr):\r
240     elt = ...  # type: expr\r
241     generators = ...  # type: typing.List[comprehension]\r
242 \r
243 class Await(expr):\r
244     value = ...  # type: expr\r
245 \r
246 class Yield(expr):\r
247     value = ...  # type: Optional[expr]\r
248 \r
249 class YieldFrom(expr):\r
250     value = ...  # type: expr\r
251 \r
252 class Compare(expr):\r
253     left = ...  # type: expr\r
254     ops = ...  # type: typing.List[cmpop]\r
255     comparators = ...  # type: typing.List[expr]\r
256 \r
257 class Call(expr):\r
258     func = ...  # type: expr\r
259     args = ...  # type: typing.List[expr]\r
260     keywords = ...  # type: typing.List[keyword]\r
261 \r
262 class Num(expr):\r
263     n = ...  # type: Union[int, float]\r
264 \r
265 class Str(expr):\r
266     s = ...  # type: str\r
267 \r
268 class FormattedValue(expr):\r
269     value = ...  # type: expr\r
270     conversion = ...  # type: typing.Optional[int]\r
271     format_spec = ...  # type: typing.Optional[expr]\r
272 \r
273 class JoinedStr(expr):\r
274     values = ...  # type: typing.List[expr]\r
275 \r
276 class Bytes(expr):\r
277     s = ...  # type: bytes\r
278 \r
279 class NameConstant(expr):\r
280     value = ...  # type: Any\r
281 \r
282 class Ellipsis(expr): ...\r
283 \r
284 class Attribute(expr):\r
285     value = ...  # type: expr\r
286     attr = ...  # type: identifier\r
287     ctx = ...  # type: expr_context\r
288 \r
289 class Subscript(expr):\r
290     value = ...  # type: expr\r
291     slice = ...  # type: _slice\r
292     ctx = ...  # type: expr_context\r
293 \r
294 class Starred(expr):\r
295     value = ...  # type: expr\r
296     ctx = ...  # type: expr_context\r
297 \r
298 class Name(expr):\r
299     id = ...  # type: identifier\r
300     ctx = ...  # type: expr_context\r
301 \r
302 class List(expr):\r
303     elts = ...  # type: typing.List[expr]\r
304     ctx = ...  # type: expr_context\r
305 \r
306 class Tuple(expr):\r
307     elts = ...  # type: typing.List[expr]\r
308     ctx = ...  # type: expr_context\r
309 \r
310 \r
311 class expr_context(AST):\r
312     ...\r
313 \r
314 class AugLoad(expr_context): ...\r
315 class AugStore(expr_context): ...\r
316 class Del(expr_context): ...\r
317 class Load(expr_context): ...\r
318 class Param(expr_context): ...\r
319 class Store(expr_context): ...\r
320 \r
321 \r
322 class boolop(AST):\r
323     ...\r
324 \r
325 class And(boolop): ...\r
326 class Or(boolop): ...\r
327 \r
328 class operator(AST):\r
329     ...\r
330 \r
331 class Add(operator): ...\r
332 class BitAnd(operator): ...\r
333 class BitOr(operator): ...\r
334 class BitXor(operator): ...\r
335 class Div(operator): ...\r
336 class FloorDiv(operator): ...\r
337 class LShift(operator): ...\r
338 class Mod(operator): ...\r
339 class Mult(operator): ...\r
340 class MatMult(operator): ...\r
341 class Pow(operator): ...\r
342 class RShift(operator): ...\r
343 class Sub(operator): ...\r
344 \r
345 class unaryop(AST):\r
346     ...\r
347 \r
348 class Invert(unaryop): ...\r
349 class Not(unaryop): ...\r
350 class UAdd(unaryop): ...\r
351 class USub(unaryop): ...\r
352 \r
353 class cmpop(AST):\r
354     ...\r
355 \r
356 class Eq(cmpop): ...\r
357 class Gt(cmpop): ...\r
358 class GtE(cmpop): ...\r
359 class In(cmpop): ...\r
360 class Is(cmpop): ...\r
361 class IsNot(cmpop): ...\r
362 class Lt(cmpop): ...\r
363 class LtE(cmpop): ...\r
364 class NotEq(cmpop): ...\r
365 class NotIn(cmpop): ...\r
366 \r
367 \r
368 class comprehension(AST):\r
369     target = ...  # type: expr\r
370     iter = ...  # type: expr\r
371     ifs = ...  # type: typing.List[expr]\r
372     is_async = ...  # type: int\r
373 \r
374 \r
375 class ExceptHandler(AST):\r
376     type = ...  # type: Optional[expr]\r
377     name = ...  # type: Optional[identifier]\r
378     body = ...  # type: typing.List[stmt]\r
379     lineno = ...  # type: int\r
380     col_offset = ...  # type: int\r
381 \r
382 \r
383 class arguments(AST):\r
384     args = ...  # type: typing.List[arg]\r
385     vararg = ...  # type: Optional[arg]\r
386     kwonlyargs = ...  # type: typing.List[arg]\r
387     kw_defaults = ...  # type: typing.List[expr]\r
388     kwarg = ...  # type: Optional[arg]\r
389     defaults = ...  # type: typing.List[expr]\r
390 \r
391 class arg(AST):\r
392     arg = ...  # type: identifier\r
393     annotation = ...  # type: Optional[expr]\r
394     lineno = ...  # type: int\r
395     col_offset = ...  # type: int\r
396     type_comment = ...  # type: typing.Optional[str]\r
397 \r
398 class keyword(AST):\r
399     arg = ...  # type: Optional[identifier]\r
400     value = ...  # type: expr\r
401 \r
402 class alias(AST):\r
403     name = ...  # type: identifier\r
404     asname = ...  # type: Optional[identifier]\r
405 \r
406 class withitem(AST):\r
407     context_expr = ...  # type: expr\r
408     optional_vars = ...  # type: Optional[expr]\r
409 \r
410 \r
411 class TypeIgnore(AST):\r
412     lineno = ...  # type: int\r