Repository navigation
Link type in docs signatures to Python's type - #2971
Merged
Merged
Conversation
When an annotation names a class Sphinx can't find, it falls back to attributes whose names end with it, so type[W] linked to arcade.types.TiledObject.type. A Python domain subclass skips arcade's objects for type in signatures, so intersphinx links Python's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2970.
type[...]in API signatures linked toarcade.types.TiledObject.type, for example inUIManager.get_widgets_at(cls: type[W] | type[UIWidget]). That was 8 links on 5 pages.Why: when an annotation names a class Sphinx can't find in Arcade's docs,
PythonDomain.resolve_xreffalls back to searching attributes with fuzzy matching, and findsTiledObject.type. Nitpicky mode can't catch this, because the link resolves.Fix: a small
PythonDomainsubclass indoc/conf.pyreturnsNonefortypein signatures, so intersphinx links Python'stypeinstead. Everything else resolves as before.I scanned the built docs for every link whose text is a Python built-in name but whose target is an Arcade page.
typewas the only one.Checked:
TiledObject.typeis still documented and linked from the index.-Whas zero warnings.🤖 Generated with Claude Code