Fix docs build breakage caused by new o.vo
Before this change, type annotations are rendered by sphinx autodoc and due to recent oslo.versionedobjects changes, expand out into multiple conflicting types that causes a warning. Instead, tell sphinx not to render type hints in autodoc. Assisted-by: Claude-code (opus 4.7) Change-Id: Ia158cf6c58faaa4db01d822706e9ff7500fdf101 Signed-off-by: Jay Faulkner <jay@jvf.cc>
This commit is contained in:
@@ -61,6 +61,15 @@ autodoc_default_options = {
|
||||
'special-members': '__call__',
|
||||
}
|
||||
|
||||
# NOTE: Disable rendering of type annotations in autodoc signatures. The
|
||||
# bare `type[...]` annotations introduced in oslo.versionedobjects produce
|
||||
# ambiguous Python cross-references (the unqualified `type` resolves to
|
||||
# several legitimate ironic attributes named `type`), which `-W` then
|
||||
# escalates to errors. Stripping annotations from rendered signatures is
|
||||
# the most targeted mitigation until the upstream library qualifies its
|
||||
# annotations.
|
||||
autodoc_typehints = 'none'
|
||||
|
||||
autosummary_mock_imports = [
|
||||
'ironic.wsgi',
|
||||
]
|
||||
|
||||
@@ -82,12 +82,16 @@ commands =
|
||||
commands = oslo_debug_helper -t ironic/tests/unit {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
allowlist_externals = dot
|
||||
allowlist_externals =
|
||||
bash
|
||||
dot
|
||||
# NOTE(dtantsur): documentation building process requires importing ironic
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -W -j auto -E -b html doc/source doc/build/html
|
||||
commands =
|
||||
bash -c 'rm -rf doc/source/contributor/api'
|
||||
sphinx-build -W -j auto -E -b html doc/source doc/build/html
|
||||
|
||||
[testenv:pdf-docs]
|
||||
allowlist_externals =
|
||||
|
||||
Reference in New Issue
Block a user