|
Revision 33, 1.2 kB
(checked in by mk, 4 years ago)
|
Check docstrings for use of reST (closes ticket #11).
|
| 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 |
def method5(self): |
|---|
| 39 |
"""Method with few definitions. |
|---|
| 40 |
|
|---|
| 41 |
:Word: And its definition. |
|---|
| 42 |
""" |
|---|
| 43 |
pass |
|---|
| 44 |
|
|---|
| 45 |
class Class2: |
|---|
| 46 |
|
|---|
| 47 |
""" |
|---|
| 48 |
Docstring one line apart from Class2 |
|---|
| 49 |
""" |
|---|
| 50 |
pass |
|---|
| 51 |
|
|---|
| 52 |
def func1(): |
|---|
| 53 |
"""Docstring for func1""" |
|---|
| 54 |
return |
|---|
| 55 |
|
|---|
| 56 |
def func2(): |
|---|
| 57 |
"Docstring for func2" |
|---|
| 58 |
return |
|---|
| 59 |
|
|---|
| 60 |
def func3(): |
|---|
| 61 |
""" |
|---|
| 62 |
Docstring for func3 |
|---|
| 63 |
""" |
|---|
| 64 |
return |
|---|
| 65 |
|
|---|
| 66 |
def func4(): |
|---|
| 67 |
# No docstring |
|---|
| 68 |
return |
|---|
| 69 |
|
|---|
| 70 |
def __func5__(self): |
|---|
| 71 |
""" |
|---|
| 72 |
Functions starting with __ are not skipped |
|---|
| 73 |
""" |
|---|
| 74 |
return |
|---|
| 75 |
|
|---|
| 76 |
def func6(): |
|---|
| 77 |
""" |
|---|
| 78 |
""" |
|---|
| 79 |
pass |
|---|
| 80 |
|
|---|
| 81 |
def func7(): |
|---|
| 82 |
"Time to get *a bit* of reST." |
|---|
| 83 |
pass |
|---|