root/branches/mk/tests/data/module1.py

Revision 32, 1.0 kB (checked in by mk, 4 years ago)

Don't count empty docstrings (closes ticket #9).

Line 
1 """
2 Docstring for module1
3 """
4
5 class Class1:
6     """
7     Docstring for Class1
8     """
9
10     def __init__(self):
11         """
12         Methods starting with __ are not skipped
13         """
14         pass
15
16     def __another_method__(self):
17         """Should not be skipped"""
18         pass
19
20     def method1(self):
21         """Docstring for method1"""
22         pass
23
24     def method2(self):
25         "Docstring for method2"
26         pass
27
28     def method3(self):
29         """
30         Docstring for method3
31         """
32         pass
33
34     def method4(self):
35         # No docstring
36         pass
37
38 class Class2:
39
40     """
41     Docstring one line apart from Class2
42     """
43     pass
44
45 def func1():
46     """Docstring for func1"""
47     return
48
49 def func2():
50     "Docstring for func2"
51     return
52
53 def func3():
54     """
55     Docstring for func3
56     """
57     return
58
59 def func4():
60     # No docstring
61     return
62
63 def __func5__(self):
64     """
65     Functions starting with __ are not skipped
66     """
67     return
68
69 def func6():
70     """
71     """
72     pass
Note: See TracBrowser for help on using the browser.