Skip to content

Commit

Permalink
bold attributes so we don't have to deal with trailing underscores. (n…
Browse files Browse the repository at this point in the history
  • Loading branch information
amueller authored and mpharrigan committed Nov 30, 2016
1 parent 46993fc commit 36fedfa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions numpydoc/docscrape_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ def _str_member_list(self, name):
out += [''] + autosum

if others:
maxlen_0 = max(3, max([len(x[0]) for x in others]))
hdr = sixu("=")*maxlen_0 + sixu(" ") + sixu("=")*10
maxlen_0 = max(3, max([len(x[0]) + 4 for x in others]))
hdr = sixu("=") * maxlen_0 + sixu(" ") + sixu("=") * 10
fmt = sixu('%%%ds %%s ') % (maxlen_0,)
out += ['', '', hdr]
for param, param_type, desc in others:
desc = sixu(" ").join(x.strip() for x in desc).strip()
if param_type:
desc = "(%s) %s" % (param_type, desc)
out += [fmt % (param.strip(), desc)]
out += [fmt % ("**" + param.strip() + "**", desc)]
out += [hdr]
out += ['']
return out
Expand Down
18 changes: 9 additions & 9 deletions numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,18 +893,18 @@ def x(self):
x
=== ==========
t (float) Current time.
y (ndarray) Current variable values.
=== ==========
===== ==========
**t** (float) Current time.
**y** (ndarray) Current variable values.
===== ==========
.. rubric:: Methods
=== ==========
a
b
c
=== ==========
===== ==========
**a**
**b**
**c**
===== ==========
""")

Expand Down

0 comments on commit 36fedfa

Please sign in to comment.