1 | #!/usr/bin/env python2
|
2 | """
|
3 | invalid_python.py
|
4 | """
|
5 | from __future__ import print_function
|
6 |
|
7 | import sys
|
8 |
|
9 | from typing import List, Any, Iterator
|
10 |
|
11 |
|
12 | def visit_star(x):
|
13 | # type: (Any) -> None
|
14 | pass
|
15 |
|
16 |
|
17 | def f():
|
18 | # type: () -> Iterator[int]
|
19 | yield 42
|
20 |
|
21 |
|
22 | class Base:
|
23 | pass
|
24 |
|
25 | class Derived:
|
26 | def __init__(self):
|
27 | # type: () -> None
|
28 |
|
29 | # Hm not hitting this error
|
30 | super(self)
|
31 |
|
32 |
|
33 | def main():
|
34 | # type: () -> None
|
35 |
|
36 | # Not handled
|
37 | print(u'unicode')
|
38 |
|
39 | # This is accepted -- as StrExpr?
|
40 | print(b'bytes')
|
41 |
|
42 | mycomplex = 3j
|
43 |
|
44 | myset = {1, 2}
|
45 |
|
46 |
|
47 | mylist = ['hi']
|
48 | # This is somehow accepted? Not StarExpr?
|
49 | visit_star(*mylist)
|