Skip to content

docs: fix ambiguous builtin cross-references - #3672

Merged
mkoura merged 1 commit into
masterfrom
docs_builtin_xref_warnings
Sep 10, 2026
Merged

mkoura merged 1 commit into
masterfrom
docs_builtin_xref_warnings

Conversation

@mkoura

@mkoura mkoura commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Autodoc emits type annotations as "specific" cross-references, so a target with no exact match is looked up by suffix. Classes with fields named after builtin types (int in utils.model_ekg, bytes and type in utils.dbsync_queries) match plain annotations like int, which produced 1108 "more than one target found" warnings and linked the annotations to unrelated attributes.

Drop the refspecific flag from cross-references to builtin types. The python domain tests for the presence of the flag, not for its value, so the attribute has to be removed.

Autodoc emits type annotations as "specific" cross-references, so a
target with no exact match is looked up by suffix. Classes with fields
named after builtin types (`int` in `utils.model_ekg`, `bytes` and
`type` in `utils.dbsync_queries`) match plain annotations like `int`,
which produced 1108 "more than one target found" warnings and linked
the annotations to unrelated attributes.

Drop the `refspecific` flag from cross-references to builtin types.
The python domain tests for the presence of the flag, not for its
value, so the attribute has to be removed.
@mkoura
mkoura merged commit 864c328 into master Sep 10, 2026
3 checks passed
@mkoura
mkoura deleted the docs_builtin_xref_warnings branch September 10, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant