- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
Latest commit
54 lines (33 loc) · 814 Bytes
/
Copy pathmain.py
File metadata and controls
54 lines (33 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from __future__ importabsolute_import
fromtypingimportList, Optional, Tuple, Union
importnumpyasnp
deff(x, y=None):
...
defg(x: int, y: Optional[int] =None) ->int:
return2
Vector=List[float]
deffunc() ->Vector:
return [1, 2, 3]
defh(x: Union[bool, List[str]]) ->Tuple[str, int]:
return"asd", 5
defbad_type(x: int):
...
bad_type("asd") # type: ignore
if__name__=="__main__":
print("asd", "asd")
# fmt: off
a=np.array([
[1, 0, 0, 0],
[0, -1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, -1],
])
# fmt: on
x=5+2
ifxisNone:
print("asd")
# Long line
print(
"asdasdasgdiausgduiasgduiasgdyas giudg aiusdg "
+"iausgd iuags diupags dipuag duiag sdiupags dasuigd "
)