Skip to content

Commit 05f55f6

Browse files
committed
FIX: Fixes after rebase
1 parent c6aafe5 commit 05f55f6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

numpydoc/docscrape_sphinx.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ def _str_returns(self, name='Returns'):
8282
out += self._str_field_list(name)
8383
out += ['']
8484
for param in self[name]:
85-
if param.type:
85+
param_type = param.type
86+
if param_type:
8687
if self.xref_param_type:
87-
param.type = make_xref_param_type(
88-
param.type,
88+
param_type = make_xref_param_type(
89+
param_type,
8990
self.xref_aliases,
9091
self.xref_ignore)
91-
out += self._str_indent([typed_fmt % (param.strip(),
92-
param.type)])
92+
out += self._str_indent([typed_fmt % (param.name.strip(),
93+
param_type)])
9394
else:
9495
out += self._str_indent([untyped_fmt % param.name.strip()])
9596
if not param.desc:
@@ -219,13 +220,14 @@ def _str_param_list(self, name, fake_autosummary=False):
219220
fake_autosummary)
220221

221222
if param.type:
223+
param_type = param.type
222224
if self.xref_param_type:
223225
param_type = make_xref_param_type(
224226
param_type,
225227
self.xref_aliases,
226228
self.xref_ignore)
227229
out += self._str_indent(['%s : %s' % (display_param,
228-
param.type)])
230+
param_type)])
229231
else:
230232
out += self._str_indent([display_param])
231233
if desc and self.use_blockquotes:

0 commit comments

Comments
 (0)