Repository navigation
Fix docs build: load scverse_misc.sphinx_ext before sphinx_autodoc_typehints - #1278
Open
LucaMarconato wants to merge 1 commit into
Open
LucaMarconato wants to merge 1 commit into
LucaMarconato wants to merge 1 commit into
Conversation
…pehints sphinx-autodoc-typehints 3.17 converts class bases to strings in its autodoc-process-bases handler, which broke scverse_doc's handler that expects classes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LucaMarconato
enabled auto-merge (squash)
October 17, 2026 14:39
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1278 +/- ##
=======================================
Coverage 91.42% 91.42%
=======================================
Files 53 53
Lines 8381 8381
=======================================
Hits 7662 7662
Misses 719 719 🚀 New features to boost your workflow:
|
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.
AI generated—manually reviewed
The docs build has been failing since #1268 (RTD build):
sphinx-autodoc-typehints3.17 now listens toautodoc-process-basesand replaces each base class with its rendered reST string.scverse_doc.autodoc(loaded viascverse_misc.sphinx_ext) has its own handler for the same event that filters out private /object/Genericbases and expects class objects. Since handlers run in registration order andsphinx_autodoc_typehintswas listed first, the scverse handler received strings.This moves
scverse_misc.sphinx_extbeforesphinx_autodoc_typehints, so the bases are filtered first and rendered afterwards. No pins needed.Tested locally with
sphinx-build -M html docs docs/_build -W(Sphinx 9.1.0, sphinx-autodoc-typehints 3.17.1, scverse-misc 0.1.7, Python 3.14): fails before, succeeds after; the "Bases:" lines render as expected (e.g.Dataset[Any],BaseTransformation).🤖 Generated with Claude Code