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