Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion numpydoc/docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def _parse_param_list(self, content, single_element_is_type=False):
# Examples: func_f1 :meth:`func_h1` :obj:`~baz.obj_r` :class:`class_j`
# <DESC> is a string describing the function.

_role = r":(?P<role>\w+):"
_role = r":(?P<role>(py:)?\w+):"
_funcbacktick = r"`(?P<name>(?:~\w+\.)?[a-zA-Z0-9_\.-]+)`"
_funcplain = r"(?P<name2>[a-zA-Z0-9_\.-]+)"
_funcname = r"(" + _role + _funcbacktick + r"|" + _funcplain + r")"
Expand Down
5 changes: 5 additions & 0 deletions numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
--------
some, other, funcs
otherfunc : relationship
:py:meth:`spyder.widgets.mixins.GetHelpMixin.show_object_info`

Examples
--------
Expand Down Expand Up @@ -435,6 +436,8 @@ def test_str():
..
`otherfunc`_
relationship
:py:meth:`spyder.widgets.mixins.GetHelpMixin.show_object_info`
..

Notes
-----
Expand Down Expand Up @@ -602,6 +605,8 @@ def test_sphinx_str():
..
:obj:`otherfunc`
relationship
:py:meth:`spyder.widgets.mixins.GetHelpMixin.show_object_info`
..

.. rubric:: Notes

Expand Down