Function python_symbols
fn python_symbols() -> Result<BTreeMap<String, String>, Error>Expand description
Every Python symbol, as its dotted path → page.md#anchor.
The top-level module’s members carry a mkdocstrings anchor each — one per
class, function and member, minted from the live object’s canonical path — and
mkdocs build --strict validates every one of them. The two #[pymodule]
submodules have no ::: block to mint anchors from (§1.3.49), so their symbols
point at the section that documents them.
A submodule is reached twice: once as a member of the top-level surface and
once as a surface of its own, and it is the first of those that produced this
generator’s one fail-open bug (§1.3.106) — atune.samplers was written with a
mkdocstrings anchor because the enclosing surface has no section, even
though the symbol itself is a submodule. The section is therefore looked up by
the symbol’s own dotted path first, and check_submodules_use_their_section
re-checks the whole map afterwards so the same slip cannot come back through a
different route.
An alias is the second such trap and produced the same class of dead link.
atune.TrialPruned and atune.Pruned are one live class object bound under two
names, so mkdocstrings renders it once and mints one anchor, from the
canonical path; a per-name anchor for the second spelling never exists. The map
therefore points an alias at its target’s anchor — the section of the page
that does document the object — and resolve_aliases fails closed if the
target resolved to nothing, because a silently dropped alias is the dead link
this pass exists to remove.