OILS / mycpp / testpkg / module1.py View on Github | oils.pub

39 lines, 17 significant
1from __future__ import print_function
2"""
3module1.py
4"""
5
6import mylib
7from mylib import log
8from testpkg import module2
9
10CONST1 = 'CONST module1'
11
12
13def func1():
14 # type: () -> None
15 log('func1')
16 mylib.print_stderr(module2.CONST2)
17
18
19def fortytwo():
20 # type: () -> int
21 return 42
22
23
24class Cat(object):
25
26 def __init__(self):
27 # type: () -> None
28 """Empty constructor for mycpp."""
29 pass
30
31 def Speak(self):
32 # type: () -> None
33 log('cat')
34
35 def AbstractMethod(self):
36 # type: () -> None
37 raise NotImplementedError()
38
39