FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix/14576 autodoc data signature by itsvedantkumar · Pull Request #14616 · sphinx-doc/sphinx · GitHub

Fix/14576 autodoc data signature - #14616

Closed
itsvedantkumar wants to merge 2 commits into
sphinx-doc:masterfrom
itsvedantkumar:fix/14576-autodoc-data-signature
Closed

Fix/14576 autodoc data signature#14616
itsvedantkumar wants to merge 2 commits into
sphinx-doc:masterfrom
itsvedantkumar:fix/14576-autodoc-data-signature

Conversation

Copy link
Copy Markdown

Purpose

Hi, the bug was that autodoc doesn't build a signature for data objects. The problem was that its internal signature list is empty for them -- and when an autodoc-process-signature event handler returns a replacement signature, the code wrote it to index 0 of that empty list and ctashed with Indexerror (the docstring then got lost & a warning was printed.)

Fix: the change basically appends the handler's signature when the list is empty & behaves exactly as before when it isn't

Proof: a regression test is also included that reproduces the IndexError without the fix and passes with it; the full autodoc test suite was run with no new failures; CHANGES.rst and AUTHORS.rst entries are included

References

Fixes #14576

AI Disclosure

Claude Fable was used to develop the patch & the test under my direction -- I have reviewed the change & understand it, per the AI policy

Copy link
Copy Markdown
Member

Closing as duplicate of #14578

jdillard closed this Aug 22, 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autodoc: IndexError formatting signature for callable data object with annotated class variable

2 participants


Back | FazBrowse Home | New Git URL