Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8ded1f0

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

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

‎doc/devel/document.rst

Copy file name to clipboardExpand all lines: doc/devel/document.rst
+4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.