Commit de8d418
docs: fix nitpicky build broken by TYPE_CHECKING-only annotations
`tox -e docs` runs `sphinx-build -W` with `nitpicky = True` and has been
failing since 53eeddf with four unresolved reference targets, all in
`src/pluggy/_manager.py`:
py:class reference target not found: _tracing.TagTracerSub
py:class reference target not found: _Plugin
py:class reference target not found: DistFacade
53eeddf moved `DistFacade` into `_compat` and left both `DistFacade` and
`importlib.metadata` as `TYPE_CHECKING`-only imports. Because `_manager`
uses `from __future__ import annotations`, autodoc's `get_type_hints()`
call now raises `NameError` for `list_plugin_distinfo` and
`list_plugin_distributions`, so it falls back to the annotation text as
written in the source. The emitted cross-reference targets changed from
fully qualified to as-written, and `_Plugin` no longer collapses to
`object` -- so the existing fully qualified `nitpick_ignore` entries stop
matching.
Ignore the as-written spellings alongside the qualified ones. These are
all private names that are intentionally not documented, so nothing that
should resolve is being hidden.
The break went unnoticed because CI does not run the `docs` tox env and
ReadTheDocs builds without `-W`.
Refs #417
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JB8YrcUSkrAojQfiNacSZJ1 parent 21bb5d1 commit de8d418
2 files changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| |||
0 commit comments