-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc_element.py
55 lines (39 loc) · 1.07 KB
/
doc_element.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
46
47
48
49
50
51
52
53
54
55
class DocElement:
"""
A part of a documentation entry (e.g. parameter, returns, etc.).
Purely abstract.
"""
def __init__(self):
pass
class ReturnElement(DocElement):
"""
Represents a return element in a documentation entry
"""
def __init__(self, text):
self.text = text
class SummaryElement(DocElement):
"""
Represents a full summary element in a documentation entry
"""
def __init__(self, text):
self.text = text
class BriefElement(DocElement):
"""
Represents a brief summary element in a documentation entry
"""
def __init__(self, text):
self.text = text
class ParamElement(DocElement):
"""
Represents a parameter element in a documentation entry
"""
def __init__(self, name, description):
self.name = name
self.description = description
class ExceptElement(DocElement):
"""
Represents a return element in a documentation entry
"""
def __init__(self, type, description):
self.type = type
self.description = description