Fix missing printoptions doc page from autosummary filename collision - #3985
Merged
zcbenz merged 1 commit intoAug 5, 2026
Merged
Conversation
zcbenz
approved these changes
Aug 4, 2026
zcbenz
force-pushed
the
fix-printoptions-autosummary-collision
branch
from
August 4, 2026 23:23
8c41096 to
432a97c
Compare
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.
Proposed changes
Building the docs warns:
PrintOptions(the class) andprintoptions(the context manager) differ only in case, so autosummary wants to writemlx.core.PrintOptions.rstandmlx.core.printoptions.rstinto the same directory. On a case insensitive filesystem, which macOS is by default, those are the same path, so one clobbers the other andprintoptionsends up with no page.Before this change
_autosummarycontains three files and the function is missing:After, all four exist:
This is the same collision
mlx.core.Streamandmlx.core.streamalready had, so I fixed it the same way the existing entry does, by mapping the class to its own filename. Reverting the change brings the warning back, so it is the cause.Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes(docs config only; verified by building the docs before and after)
quick disclosure: freshman contributor, i use Claude Code when hunting, but i found this by actually building the docs and reading the warnings, then confirmed the case collision by listing the generated stubs both ways. i picked
printoptions_classto match the existingstream_classnaming, happy to rename if you prefer something else.