Skip to content

Commit 893651e

Browse files
committed
make attributes bold (and literal) so we don't have to worry about trailing underscores. numpy/numpydoc#63
1 parent 177a423 commit 893651e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/sphinxext/numpy_ext/docscrape_sphinx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ def _str_member_list(self, name):
132132
out += [''] + autosum
133133

134134
if others:
135-
maxlen_0 = max(3, max([len(x[0]) for x in others]))
136-
hdr = sixu("=")*maxlen_0 + sixu(" ") + sixu("=")*10
135+
maxlen_0 = max(3, max([len(x[0]) + 4 for x in others]))
136+
hdr = sixu("=") * maxlen_0 + sixu(" ") + sixu("=") * 10
137137
fmt = sixu('%%%ds %%s ') % (maxlen_0,)
138138
out += ['', '', hdr]
139139
for param, param_type, desc in others:
140140
desc = sixu(" ").join(x.strip() for x in desc).strip()
141141
if param_type:
142142
desc = "(%s) %s" % (param_type, desc)
143-
out += [fmt % (param.strip(), desc)]
143+
out += [fmt % ("**" + param.strip() + "**", desc)]
144144
out += [hdr]
145145
out += ['']
146146
return out

0 commit comments

Comments
 (0)