mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Address feedback
This commit is contained in:
parent
0f0ca79e06
commit
4bad5bd419
@ -359,8 +359,8 @@ There are also config values that you can set:
|
|||||||
This value is a list of autodoc directive flags that should be automatically
|
This value is a list of autodoc directive flags that should be automatically
|
||||||
applied to all autodoc directives. The supported flags are ``'members'``,
|
applied to all autodoc directives. The supported flags are ``'members'``,
|
||||||
``'undoc-members'``, ``'private-members'``, ``'special-members'``,
|
``'undoc-members'``, ``'private-members'``, ``'special-members'``,
|
||||||
``'inherited-members'``, ``'show-inheritance'``, ``'ignore-module-all'``
|
``'inherited-members'``, ``'show-inheritance'``, ``'ignore-module-all'``,
|
||||||
and ``'exclude-members'``.
|
``'imported-members'`` and ``'exclude-members'``.
|
||||||
|
|
||||||
.. versionadded:: 1.0
|
.. versionadded:: 1.0
|
||||||
|
|
||||||
|
@ -1551,6 +1551,8 @@ def test_autodoc_default_options(app):
|
|||||||
assert ' .. py:attribute:: EnumCls.val4' not in actual
|
assert ' .. py:attribute:: EnumCls.val4' not in actual
|
||||||
actual = do_autodoc(app, 'class', 'target.CustomIter')
|
actual = do_autodoc(app, 'class', 'target.CustomIter')
|
||||||
assert ' .. py:method:: target.CustomIter' not in actual
|
assert ' .. py:method:: target.CustomIter' not in actual
|
||||||
|
actual = do_autodoc(app, 'module', 'target')
|
||||||
|
assert '.. py:function:: save_traceback(app)' not in actual
|
||||||
|
|
||||||
# with :members:
|
# with :members:
|
||||||
app.config.autodoc_default_options = {'members': None}
|
app.config.autodoc_default_options = {'members': None}
|
||||||
@ -1614,6 +1616,15 @@ def test_autodoc_default_options(app):
|
|||||||
assert ' .. py:method:: CustomIter.snafucate()' in actual
|
assert ' .. py:method:: CustomIter.snafucate()' in actual
|
||||||
assert ' Makes this snafucated.' in actual
|
assert ' Makes this snafucated.' in actual
|
||||||
|
|
||||||
|
# with :imported-members:
|
||||||
|
app.config.autodoc_default_options = {
|
||||||
|
'members': None,
|
||||||
|
'imported-members': None,
|
||||||
|
'ignore-module-all': None,
|
||||||
|
}
|
||||||
|
actual = do_autodoc(app, 'module', 'target')
|
||||||
|
assert '.. py:function:: save_traceback(app)' in actual
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||||
def test_autodoc_default_options_with_values(app):
|
def test_autodoc_default_options_with_values(app):
|
||||||
|
Loading…
Reference in New Issue
Block a user