The Sphinx docs build gains a warning when TraceFlow._foutio is rendered, because its autodoc comment
names a bare Type:
pcapkit/foundation/traceflow/traceflow.py:406: #: Type[Dumper]: Dumper class.
Napoleon resolves that Type against every class of that name in the project, and there are five, so it
emits:
WARNING: more than one target found for cross-reference 'Type'
The same warning already fires 4× on main at base, from other bare Type references; this is a
fifth instance that becomes visible as soon as _foutio carries a directive.
How it surfaced
PR #694 adds an autoattribute for _foutio under the owner's contract-versus-recipe rule (a class
private attribute carrying subclass state is contract and stays documented). The docs build on that
branch goes 55 → 56 warnings, exit 0 both sides, the one new warning being this. make docs runs
sphinx-build -b html without -W, so it does not fail the build — the check is the warning diff.
Why #694 correctly did not fix it
The fix is in pcapkit/, not in docs/, and #694 is a docs-only change that touches no library file.
Its author flagged it rather than either editing outside its ownership or dropping the directive — and
dropping the directive would hide contract to keep a warning count flat, which is the wrong trade.
Suggested fix
Qualify the reference so it resolves uniquely — :class:typing.Type`` or the fully-qualified dumper
type, matching whatever the surrounding #: comments in that file already do for unambiguous names.
Worth sweeping the other four pre-existing bare-`Type` sites in the same change, since they are the same
defect and the count only means something once they are all resolved.
The Sphinx docs build gains a warning when
TraceFlow._foutiois rendered, because its autodoc commentnames a bare
Type:Napoleon resolves that
Typeagainst every class of that name in the project, and there are five, so itemits:
The same warning already fires 4× on
mainat base, from other bareTypereferences; this is afifth instance that becomes visible as soon as
_foutiocarries a directive.How it surfaced
PR #694 adds an
autoattributefor_foutiounder the owner's contract-versus-recipe rule (a classprivate attribute carrying subclass state is contract and stays documented). The docs build on that
branch goes 55 → 56 warnings, exit 0 both sides, the one new warning being this.
make docsrunssphinx-build -b htmlwithout-W, so it does not fail the build — the check is the warning diff.Why #694 correctly did not fix it
The fix is in
pcapkit/, not indocs/, and #694 is a docs-only change that touches no library file.Its author flagged it rather than either editing outside its ownership or dropping the directive — and
dropping the directive would hide contract to keep a warning count flat, which is the wrong trade.
Suggested fix
Qualify the reference so it resolves uniquely —
:class:typing.Type`` or the fully-qualified dumpertype, matching whatever the surrounding
#:comments in that file already do for unambiguous names.Worth sweeping the other four pre-existing bare-`Type` sites in the same change, since they are the same
defect and the count only means something once they are all resolved.