-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrst_docstrings.py
45 lines (34 loc) · 1010 Bytes
/
rst_docstrings.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
"""
# PEP 287 - reStructuredText docstrings examples
## Links
[PEP 287 - reStructuredText Docstring Format](https://www.python.org/dev/peps/pep-0287/)
"""
class RSTExample:
@staticmethod
def reference():
"""
This is a reference for ``RST-style`` docstrings. Check :data:`source` code
to see how it works.
:param my_param: Parameter example
:param int typed_param: Typed parameter example
:returns str: Return statement
:raises ValueError: Raises example
Code example::
data = {
'key': 'value',
}
print(data)
"""
@staticmethod
def rtype_test():
"""
`:rtype:` test.
:returns: Return statement
:rtype: bool
"""
@staticmethod
def replace_test():
"""
Check if all :attr:`attributes`, :data:``data`` and :exc:`Exception` in
:class:``RSTExample`` and :class:`RSTExample` look good.
"""