mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
napoleon: simplify seealso transformation
This commit is contained in:
parent
078aaf5f13
commit
0b200d82fd
@ -1240,14 +1240,13 @@ class NumpyDocstring(GoogleDocstring):
|
||||
for func, description, role in items
|
||||
]
|
||||
|
||||
func_role = 'obj'
|
||||
lines = [] # type: List[str]
|
||||
last_had_desc = True
|
||||
for func, desc, role in items:
|
||||
for name, desc, role in items:
|
||||
if role:
|
||||
link = ':%s:`%s`' % (role, func)
|
||||
link = ':%s:`%s`' % (role, name)
|
||||
else:
|
||||
link = ':%s:`%s`' % (func_role, func)
|
||||
link = ':obj:`%s`' % name
|
||||
if desc or last_had_desc:
|
||||
lines += ['']
|
||||
lines += [link]
|
||||
|
Loading…
Reference in New Issue
Block a user