fix: sphinx inline types rejected with an ellipsis or quotes (#1015) - #1016
Merged
jshwi merged 1 commit intoJul 25, 2026
Conversation
Signed-off-by: Stephen Whitlock <s.whitlock@live.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1016 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 30 30
Lines 5407 5415 +8
=========================================
+ Hits 5407 5415 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jshwi
deleted the
1015-sphinx-inline-type-rejected-when-it-contains-an-ellipsis-or-quotes
branch
July 25, 2026 04:55
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.
Closes #1015
A
:param <type> <name>:field whose type contained a bare ellipsis(
tuple[int, ...],Callable[..., str]) or a quoted member(
Literal['a', 'b'],Annotated[int, "m"]) was parsed as if the typeended early. The parameter name became a fragment of the type
(
tuple[int,Callable[) and the next character was read as a badclosing token, so legal code raised SIG302, SIG304, SIG305 and SIG404.
_FIELD_WORDnow builds a field word from word characters plus thepunctuation that joins them in a type —
. , | [ ] ' "— while stillrefusing to end on a
.or|, so a stray trailing one beforewhitespace is left outside the word and is still read as a bad closing
token. Verified unchanged against
:param int. param1:and:param int param3, Description., which report exactly as before.