-
Notifications
You must be signed in to change notification settings - Fork 62
/
example_javadoc.py.patch
157 lines (146 loc) · 3.77 KB
/
example_javadoc.py.patch
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Patch generated by Pyment v0.4.0
--- a/example.py
+++ b/example.py
@@ -1,103 +1,96 @@
def func1(param1: str, param2='default val'):
- '''Description of func with docstring javadoc style.
+ """Description of func with docstring javadoc style.
+
+ @param param1: descr of param
+ @type param1: str
+ @param param2: (Default value = 'default val')
+ @return: some value
+ @raise KeyError: raises a key exception
+
+ """
+ pass
+
+def func2(param1, param2='default val2') -> list:
+ """Description of func with docstring reST style.
@param param1: descr of param
@type param1: type
+ @param param2: (Default value = 'default val2')
@return: some value
- @raise KeyError: raises a key exception
+ @rtype: list
+ @raise keyError: raises exception
- '''
- pass
-
-def func2(param1, param2='default val2') -> list:
- '''Description of func with docstring reST style.
-
- :param param1: descr of param
- :type param1: type
- :returns: some value
- :raises keyError: raises exception
-
- '''
+ """
pass
def func3(param1, param2='default val'):
- '''Description of func with docstring groups style.
+ """Description of func with docstring groups style.
- Params:
- param1 - descr of param
+ @param param1: descr of param
+ @param param2: (Default value = 'default val')
+ @return: some value
+ @raise keyError: raises key exception
+ @raise TypeError: raises type exception
- Returns:
- some value
-
- Raises:
- keyError: raises key exception
- TypeError: raises type exception
-
- '''
+ """
pass
class SomeClass(object):
- '''My class.
- '''
+ """My class."""
def method(self, prm):
- '''description'''
+ """description
+
+ @param prm:
+
+ """
pass
def method2(self, prm1, prm2='defaultprm'):
+ """
+
+ @param prm1:
+ @param prm2: (Default value = 'defaultprm')
+
+ """
pass
def method_numpy(self):
- """
- My numpydoc description of a kind
+ """My numpydoc description of a kind
of very exhautive numpydoc format docstring.
- Parameters
- ----------
- first : array_like
- the 1st param name `first`
- second :
- the 2nd param
- third : {'value', 'other'}, optional
- the 3rd param, by default 'value'
-
- Returns
- -------
- string
- a value in a string
-
- Raises
- ------
- KeyError
- when a key error
- OtherError
- when an other error
+ @param first: the 1st param name `first`
+ @type first: array_like
+ @param second: the 2nd param
+ @param third: the 3rd param, by default 'value'
+ @type third: {'value', 'other'}, optional
+ @return: a value in a string
+ @rtype: string
+ @raise KeyError: when a key error
+ @raise OtherError: when an other error
See Also
--------
a_func : linked (optional), with things to say
on several lines
some blabla
-
+
Note
----
Some informations.
-
+
Some maths also:
.. math:: f(x) = e^{- x}
-
References
----------
Biblio with cited ref [1]_. The ref can be cited in Note section.
-
+
.. [1] Adel Daouzli, Sylvain Saïghi, Michelle Rudolph, Alain Destexhe,
Sylvie Renaud: Convergence in an Adaptive Neural Network:
The Influence of Noise Inputs Correlation. IWANN (1) 2009: 140-148
-
Examples
--------
This is example of use
>>> print "a"
a
-
"""
pass