autodoc: Respect member-order in autodoc_default_options as documented

In the `autodoc_default_options` documentation, it mentions that
`member-order` is respected; however, when setting the key-value pair in
`conf.py`, it is not.  Thus, add `member-order` as one of the default
options respected in `conf.py`.  Additionally, update the list of
supported options to match the example.
This commit is contained in:
Eric N. Vander Weele 2018-10-14 20:19:03 -04:00
parent d6b9db9581
commit 9fcef5030a
2 changed files with 5 additions and 4 deletions

View File

@ -383,9 +383,10 @@ There are also new config values that you can set:
Setting ``None`` is equivalent to giving the option name in the list format Setting ``None`` is equivalent to giving the option name in the list format
(i.e. it means "yes/true/on"). (i.e. it means "yes/true/on").
The supported options are ``'members'``, ``'undoc-members'``, The supported options are ``'members'``, ``'member-order'``,
``'private-members'``, ``'special-members'``, ``'inherited-members'``, ``'undoc-members'``, ``'private-members'``, ``'special-members'``,
``'show-inheritance'``, ``'ignore-module-all'`` and ``'exclude-members'``. ``'inherited-members'``, ``'show-inheritance'``, ``'ignore-module-all'`` and
``'exclude-members'``.
.. versionadded:: 1.8 .. versionadded:: 1.8

View File

@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)
# common option names for autodoc directives # common option names for autodoc directives
AUTODOC_DEFAULT_OPTIONS = ['members', 'undoc-members', 'inherited-members', AUTODOC_DEFAULT_OPTIONS = ['members', 'undoc-members', 'inherited-members',
'show-inheritance', 'private-members', 'special-members', 'show-inheritance', 'private-members', 'special-members',
'ignore-module-all', 'exclude-members'] 'ignore-module-all', 'exclude-members', 'member-order']
class DummyOptionSpec: class DummyOptionSpec: