You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eb35d4b
Browse filesBrowse the repository at this point in the historyBrowse files
docs: display Protocol in ProtocolBase member cross-references (#1103)
The owner refined the #1103 ruling: a `ProtocolBase.<member>` reference should
read `Protocol.<member>` in the rendered docs, for one consistent public
vocabulary, while the link still targets the `ProtocolBase` attribute. That is
the split-display-target form, `:meth:`Protocol.X <...protocol.ProtocolBase.X>``,
applied across everything Sphinx renders.
* 46 reference sites in `pcapkit/` and `docs/source/` now display
`Protocol.<member>`. 37 keep their `ProtocolBase` target, which is the
requested form; the other 9 already targeted `Protocol` -- #2420 moved those
targets but left the display text reading `ProtocolBase` -- and are now
display-consistent too.
* Three short-form references in `protocol.py` gained an explicit
fully-qualified target, so the display text could change without repointing
the link: `:meth:`ProtocolBase._parse_next_layer`` is now
`:meth:`Protocol._parse_next_layer <...ProtocolBase._parse_next_layer>``.
* `__init_subclass__` keeps displaying `ProtocolBase` (6 sites). `Protocol`
defines its own override, so displaying `Protocol` there would name a
different method than the link resolves to.
* Two further sites keep `ProtocolBase` because the adjacent prose would
otherwise contradict itself: `schema.py`'s comment reads "``ProtocolBase``,
not ``Protocol``" two lines above its reference, and
`protocol-layer-placement.rst` asserts `OSPF.__proto__` *is* that attribute
inside a paragraph analysing MRO set-difference.
* The `Raises:` clause of `register` is unchanged. It names the class the
guard's `issubclass` actually tests, not a member whose documentation is
being pointed at, and `tests/protocols/test_register_class_guard_unit.py`
asserts that wording (#2316/#1016).
* `tests/` and `examples/` are untouched (28 sites). Their docstrings are not
part of the Sphinx render, so the display rationale does not reach them.
No link was repointed: a guard canonicalises every role target before and
after and reports them identical, bar the three short-form expansions, which
resolve to the same object. An AST-structure guard (`ast.dump` with docstrings
stripped) confirms all 26 touched `.py` files are prose-only.
0 commit comments