From 9d1fbd77b7f7b4427433a267899a30be722564d1 Mon Sep 17 00:00:00 2001 From: Jarry Shaw Date: Wed, 23 Sep 2026 17:18:38 -0400 Subject: [PATCH] fix(docs): keep AppType linkable while no-indexing its 8,182 members :no-index: on the AppType autoclass (reg.rst:76) fixed the builtin collisions but also dropped AppType's own py-domain target, breaking every :class: link to it -- the 4 hand-written refs plus ~31 more generated from type annotations in pcapkit/protocols/schema/transport and pcapkit/protocols/transport/transport.py. Add an invisible `.. py:class:: AppType` stub with :no-typesetting: right before the no-indexed autoclass (reg.rst:73). It registers just the class's own cross-reference target; docutils merges that anchor onto the autoclass's own signature block, so there's no visible duplicate "class AppType" header. Members stay unindexed, still visible as content. Restored the three hand-converted plain literals (reg.rst's list-table row, application/index.rst, pep.rst) back to :class: links. vendor/reg.rst:63's existing :class: ref needed no edit -- it resolves again automatically once AppType has a target. Fresh -E build: 49 warnings before and after, byte-identical. Bare dict in :type: fields still resolves to docs.python.org, confirming the original fix isn't regressed. objects.inv: +1 py:class entry for AppType, 0 new py:attribute entries for its members. Fixes #717. --- docs/source/pcapkit/const/reg.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/source/pcapkit/const/reg.rst b/docs/source/pcapkit/const/reg.rst index 978cf35857..b61531c2c8 100644 --- a/docs/source/pcapkit/const/reg.rst +++ b/docs/source/pcapkit/const/reg.rst @@ -65,10 +65,19 @@ Application Layer Protocol Numbers This module contains the constant enumeration for **Application Layer Protocol Numbers**, which is automatically generated from :class:`pcapkit.vendor.reg.apptype.AppType`. +.. AppType has 8,182 members, six of which collide with builtins (dict, exec, help, + max, set, sum) and win bare ``:type:`` lookups project-wide (#717). The autoclass + below no-indexes itself and every member to kill those collisions; this stub keeps + :class:`AppType ` itself a working xref target. + +.. py:class:: AppType + :no-typesetting: + .. autoclass:: pcapkit.const.reg.apptype.AppType :members: :undoc-members: :show-inheritance: + :no-index: .. rubric:: Footnotes