Skip to content

Commit

Permalink
Better round tripping for See also section
Browse files Browse the repository at this point in the history
Potential Fix for #188
  • Loading branch information
hmaarrfk committed Aug 12, 2018
1 parent 659e43f commit 1ce18aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion numpydoc/docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def _str_see_also(self, func_role):
elif func_role:
link = ':%s:`%s`' % (func_role, func)
else:
link = "`%s`_" % func
link = "%s" % func
if desc or last_had_desc:
out += ['']
out += [link]
Expand Down
9 changes: 7 additions & 2 deletions numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@
doc_yields = NumpyDocString(doc_yields_txt)


def test_to_docstring():
# Simple test, this should just not raise
NumpyDocString(doc.to_docstring())


def test_signature():
assert doc['Signature'].startswith('numpy.multivariate_normal(')
assert doc['Signature'].endswith('spam=None)')
Expand Down Expand Up @@ -402,9 +407,9 @@ def test_str():
See Also
--------
`some`_, `other`_, `funcs`_
some, other, funcs
`otherfunc`_
otherfunc
relationship
Notes
Expand Down

0 comments on commit 1ce18aa

Please sign in to comment.