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 b8aaff1
Browse filesBrowse the repository at this point in the historyBrowse files
docs: retarget Protocol/ProtocolBase cross-references to match the #1103 display rule (#2422)
Applying the #1103 ruling to the member references #2420 left behind: a
`ProtocolBase.<member>` cross-reference now reads `Protocol.<member>`, for one
consistent public vocabulary, and links there too.
Both halves move, because on the rendered page that is where the documentation
is. `protocol.rst` documents the members with nested
`autoproperty`/`automethod` directives under `.. autoclass:: ...Protocol`, so
`Protocol.<member>` carries the signature and the docstring; the `ProtocolBase`
block is `:no-members:` plus grouped `:no-index-entry:` stubs whose body only
links back to the `Protocol.*` entries, and the general index lists `Protocol.*`
alone. Measured on the pinned docs toolchain (`Sphinx==9.2.0`).
* 46 sites in `pcapkit/` and `docs/source/`. 37 move display *and* target to
`Protocol.<member>`; the other 9 already targeted `Protocol` and only needed
the display text. The explicit target is the fully-qualified spelling the
house style asks for -- the form 124 existing references already use.
* `from_data` is consistent again: `internet.py` and `application.py` pointed
at `ProtocolBase.from_data` where `link.py` and `transport.py` pointed at
`Protocol.from_data` for the same kind of reference. All four now read alike.
* `__init_subclass__` keeps `ProtocolBase` (6 sites), since `Protocol`
overrides it and naming `Protocol` would name a different method. So do
`schema.py` and `protocol-layer-placement.rst`, whose adjacent prose would
otherwise contradict itself, and `register`'s `Raises:` clause, which names
the class the guard's `issubclass` tests (#2316/#1016).
* `changelog/1.5.0.rst` keeps its five `ProtocolBase.<member>` references.
Each names the class a *built-in* protocol inherits the member from -- the
built-ins derive from `ProtocolBase`, not `Protocol` -- and `CHANGELOG.md` is
generated from that file by `util/changelog_md.py`, where a role flattens to
a code span with no link, so moving them would rewrite release-note prose
rather than an href.
* `tests/` and `examples/` are untouched (28 sites): their docstrings are not
part of the Sphinx render.
Hrefs only. A role-canonicalisation guard reports no role and no display-text
change beyond the above, and an AST-structure guard (`ast.dump` with docstrings
stripped) is identical for every touched `.py` file.
0 commit comments