Add fix for #296#297
Merged
Merged
Conversation
Collaborator
Author
|
Well that doesn't seem to work... |
gaborbernat
requested changes
Jan 17, 2023
gaborbernat
left a comment
Member
There was a problem hiding this comment.
You'll need to fix the CI 🤔
gaborbernat
approved these changes
Jan 17, 2023
Member
|
Almost just need to fix CI on 3.7 and 3.8! |
gaborbernat
approved these changes
Jan 17, 2023
Closed
gaborbernat
added a commit
to gaborbernat/sphinx-autodoc-typehints
that referenced
this pull request
Feb 23, 2026
PR tox-dev#297 disabled overload detection to work around Sphinx not emitting autodoc-process-signature events for overloaded functions. However, this removed valuable type information from documentation, as users with complex overloaded APIs lost their distinct signature variants. Sphinx 9's directive-based architecture now handles overloads natively with proper signature rendering. By removing the overload-clearing workaround, all overload variants appear in documentation with their specific type signatures intact, giving users complete type information for overloaded functions. Resolves tox-dev#529
gaborbernat
added a commit
to gaborbernat/sphinx-autodoc-typehints
that referenced
this pull request
Feb 24, 2026
PR tox-dev#297 disabled overload signatures to avoid Sphinx architectural issues where autodoc-process-signature events don't fire for overloads. This removed valuable type information from documentation for functions with multiple type signatures. Instead of showing overloads in signature lines (where types can't be cross-referenced), cache them during analysis and render them in docstrings as a formatted field list. This gives each overload variant with properly cross-referenced types while avoiding the architectural limitations. Functions with @overload decorators now show: Overloads: * param (int) → str * param (list[int]) → dict[str, int] All types are cross-referenced and clickable in HTML output. Generic return types are suppressed when overloads are present since each variant already shows its specific return type. Resolves tox-dev#529
gaborbernat
added a commit
that referenced
this pull request
Feb 24, 2026
* ✨ feat(signatures): render overloads in docstrings with type formatting PR #297 disabled overload signatures to avoid Sphinx architectural issues where autodoc-process-signature events don't fire for overloads. This removed valuable type information from documentation for functions with multiple type signatures. Instead of showing overloads in signature lines (where types can't be cross-referenced), cache them during analysis and render them in docstrings as a formatted field list. This gives each overload variant with properly cross-referenced types while avoiding the architectural limitations. Functions with @overload decorators now show: Overloads: * param (int) → str * param (list[int]) → dict[str, int] All types are cross-referenced and clickable in HTML output. Generic return types are suppressed when overloads are present since each variant already shows its specific return type. Resolves #529 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.
See the explanation in the diff and in issue #296.
Resolves #296.