Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ded1f0

Browse files
committed
DOC: Clarify that types in docstrings do not use formal type annotation
syntax
1 parent 6083ecd commit 8ded1f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/devel/document.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,10 @@ understandable by humans. If the possible types are too complex use a
537537
simplification for the type description and explain the type more
538538
precisely in the text.
539539

540+
We do not use formal type annotation syntax for type descriptions in
541+
docstrings; e.g. we use ``list of str`` rather than ``list[str]``; we
542+
use ``int or str`` rather than ``int | str`` or ``Union[int, str]``.
543+
540544
Generally, the `numpydoc docstring guide`_ conventions apply. The following
541545
rules expand on them where the numpydoc conventions are not specific.
542546

0 commit comments

Comments
 (0)