-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
54 lines (33 loc) · 814 Bytes
/
main.py
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__ import absolute_import
from typing import List, Optional, Tuple, Union
import numpy as np
def f(x, y=None):
...
def g(x: int, y: Optional[int] = None) -> int:
return 2
Vector = List[float]
def func() -> Vector:
return [1, 2, 3]
def h(x: Union[bool, List[str]]) -> Tuple[str, int]:
return "asd", 5
def bad_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
if x is None:
print("asd")
# Long line
print(
"asdasdasgdiausgduiasgduiasgdyas giudg aiusdg "
+ "iausgd iuags diupags dipuag duiag sdiupags dasuigd "
)