mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
add more extendable options and tests
This commit is contained in:
parent
0a85b4148e
commit
7348ba8d60
@ -87,7 +87,8 @@ def process_documenter_options(documenter: "Type[Documenter]", config: Config, o
|
||||
negated = options.pop('no-' + name, True) is None
|
||||
if name in config.autodoc_default_options and not negated:
|
||||
if name in options:
|
||||
# take value from options if present or extend it with autodoc_default_options if necessary
|
||||
# take value from options if present or extend it
|
||||
# with autodoc_default_options if necessary
|
||||
if name in AUTODOC_EXTENDABLE_OPTIONS:
|
||||
if options[name] is not None and options[name].startswith('+'):
|
||||
options[name] = ','.join([config.autodoc_default_options[name],
|
||||
|
@ -835,6 +835,10 @@ def test_autodoc_special_members(app):
|
||||
' .. py:method:: Class.undocmeth()'
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
def test_autodoc_special_members_extentiable(app):
|
||||
|
||||
# specific special methods from autodoc_default_options
|
||||
options = {"undoc-members": None}
|
||||
app.config.autodoc_default_options["special-members"] = "__special2__"
|
||||
|
Loading…
Reference in New Issue
Block a user