gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / input / func_noerror_no_warning_docstring.py @ 745
History | View | Annotate | Download (926 Bytes)
1 |
''' Test for inheritence '''
|
---|---|
2 |
from __future__ import print_function |
3 |
__revision__ = 1
|
4 |
# pylint: disable=too-few-public-methods, using-constant-test
|
5 |
class AAAA(object): |
6 |
''' class AAAA '''
|
7 |
|
8 |
def __init__(self): |
9 |
pass
|
10 |
|
11 |
def method1(self): |
12 |
''' method 1 '''
|
13 |
print(self)
|
14 |
|
15 |
def method2(self): |
16 |
''' method 2 '''
|
17 |
print(self)
|
18 |
|
19 |
class BBBB(AAAA): |
20 |
''' class BBBB '''
|
21 |
|
22 |
def __init__(self): |
23 |
AAAA.__init__(self)
|
24 |
|
25 |
# should ignore docstring calling from class AAAA
|
26 |
def method1(self): |
27 |
AAAA.method1(self)
|
28 |
|
29 |
class CCCC(BBBB): |
30 |
''' class CCCC '''
|
31 |
|
32 |
def __init__(self): |
33 |
BBBB.__init__(self)
|
34 |
|
35 |
# should ignore docstring since CCCC is inherited from BBBB which is
|
36 |
# inherited from AAAA containing method2
|
37 |
if __revision__:
|
38 |
def method2(self): |
39 |
AAAA.method2(self)
|
40 |
else:
|
41 |
def method2(self): |
42 |
AAAA.method1(self)
|