Skip to content

Fix docs build: load scverse_misc.sphinx_ext before sphinx_autodoc_typehints - #1278

Open
LucaMarconato wants to merge 1 commit into
mainfrom
fix-docs-bases-order
Open

LucaMarconato wants to merge 1 commit into
mainfrom
fix-docs-bases-order

Conversation

@LucaMarconato

@LucaMarconato LucaMarconato commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

AI generated—manually reviewed

The docs build has been failing since #1268 (RTD build):

Handler <function _skip_private_bases> for event 'autodoc-process-bases' threw an exception (exception: 'str' object has no attribute '__name__')

sphinx-autodoc-typehints 3.17 now listens to autodoc-process-bases and replaces each base class with its rendered reST string. scverse_doc.autodoc (loaded via scverse_misc.sphinx_ext) has its own handler for the same event that filters out private / object / Generic bases and expects class objects. Since handlers run in registration order and sphinx_autodoc_typehints was listed first, the scverse handler received strings.

This moves scverse_misc.sphinx_ext before sphinx_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

…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
LucaMarconato enabled auto-merge (squash) October 17, 2026 14:39
@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.42%. Comparing base (9ffe082) to head (58e12c9).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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