Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better round tripping for See also section #189

Closed
wants to merge 1 commit into from
Closed
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 @@ -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(str(doc))


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