Repository navigation
Turn on nitpicky mode for the docs - #2970
Merged
Merged
Conversation
Sphinx now warns about every reference it can't resolve, and the -W docs build fails on them, so broken links get caught. The remaining warnings are handled in conf.py: - Type variables and private names are ignored. - Short names that annotations use (Controller, Vec2, Point2...) are mapped to their full names by a missing-reference handler. - pyglet links go to pyglet's development docs, which cover pyglet 3. References use pyglet 3 names (AudioPlayer, graphics.draw.Batch). - pytiled_parser and typing_extensions are added to intersphinx. - autodoc_preserve_defaults keeps a <class ...> default from breaking a signature. Also documents the Point, Point2, Point3, Point2List, RGBA255, RGBOrA255 and OneOrIterableOf type aliases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
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.
Closes #2297. Part 2, after #2969 fixed the broken references.
nitpicky = Truemakes Sphinx warn about every reference it can't resolve. CI's docs build uses-W, so a new broken link now fails the build. With this PR the nitpicky build has 0 warnings, down from about 275 after #2969.What the remaining warnings were, and how they're handled (
doc/conf.py)SpriteType,W,T,Pand similar in generic signatures. They aren't documented, sonitpick_ignore_regexskips them. It also skips private names (leading underscore) that show up in signatures.Controller,Vec2,Mat4,Point2,RGBA255and others. Modules import these only for type checking, so Sphinx sees the bare name. A smallmissing-referencehandler maps each one inSHORT_NAMESto its full name. Sphinx resolves arcade's own names, and intersphinx resolves the other libraries'. I triedautodoc_type_aliasesfirst, but it producedTypeAliasForwardRefreferences instead.media.player.Player→AudioPlayer,graphics.Batch/Group→graphics.draw.Batch/Group,shapes.Circleis a class,TextLayout.content_widthis a property, and the atlas raisespyglet.graphics.atlas.AllocatorException.pygletandpyglet.glhave no module pages in pyglet's docs, so those mentions are plain text now.pyglet.media.codecs.MediaDecoderisn't in pyglet's docs at all, so it's onnitpick_ignore.pymunk.Shape.moment_of_inertiadoesn't exist; the attribute ispymunk.Shape.moment.itertools.chain(a function) andtyping.Callable(data).Point,Point2,Point3,Point2List,RGBA255,RGBOrA255andOneOrIterableOf, using the"data"option from Fail the docs build on quick index config problems #2967.Point's description had a line that started with#instead of#:, which droppedfloatfrom it.autodoc_preserve_defaults = True:UIManager.get_widgets_at(cls=UIWidget)rendered its default as<class 'arcade.gui.widgets.UIWidget'>. Sphinx couldn't parse that, so it split the signature at commas and broketuple[float | int, float | int]apart. Defaults now show as written in the source,cls=UIWidget. This changed no other warnings.Checked
-Whas zero warnings.ControllerandVec2link to pyglet 3's docsPoint2links to the types page|pyglet Player|links to pyglet 3'sAudioPlayerget_widgets_at's signature renders correctlyPoint'sColorlinks to arcade'sColor. TheColorshort name maps to pytiled_parser's, because that's whatarcade.tilemapimports under the name, so I madePointname arcade's explicitly.Found, not fixed here
type[...]in signatures links toarcade.types.TiledObject.typeinstead of Python'stype. Sphinx's fuzzy name matching picks the attribute. Nitpicky mode can't catch it, because the link resolves.🤖 Generated with Claude Code