Skip to content

Better round tripping for See also section #189

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

Closed
wants to merge 1 commit into from
Closed
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
Better round tripping for See also section
Potential Fix for #188
  • Loading branch information
hmaarrfk committed Aug 12, 2018
commit 08e243dc484bd7a76b546dd20030dcd0fea117b1
2 changes: 1 addition & 1 deletion numpydoc/docscrape.py
Original file line number Diff line number Diff line change
@@ -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]
9 changes: 7 additions & 2 deletions numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
@@ -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)')
@@ -402,9 +407,9 @@ def test_str():
See Also
--------

`some`_, `other`_, `funcs`_
some, other, funcs

`otherfunc`_
otherfunc
relationship

Notes