Skip to content

Commit 83a7d77

Browse files
Merge pull request #7674 from jorisvandenbossche/doc-options-docstringwidth
DOC: remove extra spaces from option descriptions
2 parents 4a27e63 + 497cbc1 commit 83a7d77

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

pandas/core/config.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ def __doc__(self):
334334
335335
Parameters
336336
----------
337-
pat : str/regex
338-
If specified only options matching `prefix*` will be reset.
337+
pat : str/regex
338+
If specified only options matching `prefix*` will be reset.
339339
Note: partial matches are supported for convenience, but unless you
340340
use the full option name (e.g. x.y.z.option_name), your code may break
341341
in future versions if new options with similar names are introduced.
@@ -368,7 +368,7 @@ class option_context(object):
368368
Context manager to temporarily set options in the `with` statement context.
369369
370370
You need to invoke as ``option_context(pat, val, [(pat, val), ...])``.
371-
371+
372372
Examples
373373
--------
374374
@@ -628,20 +628,21 @@ def _build_option_description(k):
628628
o = _get_registered_option(k)
629629
d = _get_deprecated_option(k)
630630

631-
s = u('%s : ') % k
632-
if o:
633-
s += u('[default: %s] [currently: %s]') % (o.defval,
634-
_get_option(k, True))
631+
s = u('%s ') % k
635632

636633
if o.doc:
637-
s += '\n '.join(o.doc.strip().split('\n'))
634+
s += '\n'.join(o.doc.strip().split('\n'))
638635
else:
639-
s += 'No description available.\n'
636+
s += 'No description available.'
637+
638+
if o:
639+
s += u('\n [default: %s] [currently: %s]') % (o.defval,
640+
_get_option(k, True))
640641

641642
if d:
642643
s += u('\n\t(Deprecated')
643644
s += (u(', use `%s` instead.') % d.rkey if d.rkey else '')
644-
s += u(')\n')
645+
s += u(')')
645646

646647
s += '\n\n'
647648
return s

0 commit comments

Comments
 (0)