Skip to content

Commit 0e4ea68

Browse files
authored
doc: docstring style (#2682)
Update expected docstring format.
1 parent c6916d8 commit 0e4ea68

1 file changed

Lines changed: 3 additions & 21 deletions

File tree

doc/development.rst

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,10 @@ Python
109109

110110
- We use Python `type
111111
hints <https://docs.python.org/3/library/typing.html>`__ for all
112-
functions (but not for class attributes, since they are not supported
113-
by the current Python doxygen filter). In Python code, type hints
114-
should be used instead of doxygen ``@type``.
112+
functions and attributes. We do not include any other redundant
113+
type annotation in docstrings.
115114

116-
For function docstrings, follow this format:
117-
118-
::
119-
120-
"""One-line description.
121-
122-
Possible a more detailed description
123-
124-
Arguments:
125-
Argument1: This needs to start on the same line, otherwise the current
126-
doxygen filter will fail.
127-
128-
Returns:
129-
Return value
130-
131-
Raises:
132-
SomeError in case of some error.
133-
"""
115+
- We use the `sphinx docstring-style <https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html>`__ for new code.
134116

135117
C++
136118
^^^

0 commit comments

Comments
 (0)