diff --git a/changelog/417.trivial.rst b/changelog/417.trivial.rst new file mode 100644 index 00000000..00d15ce8 --- /dev/null +++ b/changelog/417.trivial.rst @@ -0,0 +1 @@ +Fix the ``tox -e docs`` build, which failed under ``sphinx-build -W`` because nitpicky mode reported unresolved references to the private names ``_tracing.TagTracerSub``, ``DistFacade`` and ``_Plugin``. diff --git a/docs/conf.py b/docs/conf.py index 3f621bd6..fce8fa4c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -63,11 +63,19 @@ autodoc_member_order = "bysource" nitpicky = True +# Some annotations in `pluggy._manager` reference names that only exist under +# `typing.TYPE_CHECKING` (`DistFacade`, `importlib.metadata`), so autodoc cannot +# evaluate them and falls back to the annotation as written in the source. +# That means private names show up both fully qualified and as written. nitpick_ignore = { # Don't want to expose this yet (see #428). ("py:class", "pluggy._tracing.TagTracerSub"), + ("py:class", "_tracing.TagTracerSub"), # Compat hack, don't want to expose it. ("py:class", "pluggy._compat.DistFacade"), + ("py:class", "DistFacade"), + # Private alias for `object`. + ("py:class", "_Plugin"), # `types.ModuleType` turns into `module` but then fails to resolve... ("py:class", "module"), # Just a TypeVar.