diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-30 00:53:59 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-30 00:53:59 +0900 |
commit | 0b200d82fd48cf60a51648a9a67eec77296cb61b (patch) | |
tree | ca67a834100dcaeda40de6095b18519423a8aa12 | |
parent | 078aaf5f13e01b99619763e4f4eae6665ec2da26 (diff) | |
download | sphinx-git-cleanup_napoleon.tar.gz |
napoleon: simplify seealso transformationcleanup_napoleon
-rw-r--r-- | sphinx/ext/napoleon/docstring.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 20d9e1b9e..bcd2d2426 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -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] |