Skip to content

Commit 1ce18aa

Browse files
committed
Better round tripping for See also section
Potential Fix for #188
1 parent 659e43f commit 1ce18aa

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

numpydoc/docscrape.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def _str_see_also(self, func_role):
442442
elif func_role:
443443
link = ':%s:`%s`' % (func_role, func)
444444
else:
445-
link = "`%s`_" % func
445+
link = "%s" % func
446446
if desc or last_had_desc:
447447
out += ['']
448448
out += [link]

numpydoc/tests/test_docscrape.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@
150150
doc_yields = NumpyDocString(doc_yields_txt)
151151

152152

153+
def test_to_docstring():
154+
# Simple test, this should just not raise
155+
NumpyDocString(doc.to_docstring())
156+
157+
153158
def test_signature():
154159
assert doc['Signature'].startswith('numpy.multivariate_normal(')
155160
assert doc['Signature'].endswith('spam=None)')
@@ -402,9 +407,9 @@ def test_str():
402407
See Also
403408
--------
404409
405-
`some`_, `other`_, `funcs`_
410+
some, other, funcs
406411
407-
`otherfunc`_
412+
otherfunc
408413
relationship
409414
410415
Notes

0 commit comments

Comments
 (0)