Skip to content

fix: sphinx inline types rejected with an ellipsis or quotes (#1015) - #1016

Merged
jshwi merged 1 commit into
masterfrom
1015-sphinx-inline-type-rejected-when-it-contains-an-ellipsis-or-quotes
Jul 25, 2026
Merged

fix: sphinx inline types rejected with an ellipsis or quotes (#1015)#1016
jshwi merged 1 commit into
masterfrom
1015-sphinx-inline-type-rejected-when-it-contains-an-ellipsis-or-quotes

Conversation

@jshwi

@jshwi jshwi commented Jul 25, 2026

Copy link
Copy Markdown
Owner

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 type
ended early. The parameter name became a fragment of the type
(tuple[int, Callable[) and the next character was read as a bad
closing token, so legal code raised SIG302, SIG304, SIG305 and SIG404.

_FIELD_WORD now builds a field word from word characters plus the
punctuation that joins them in a type — . , | [ ] ' " — while still
refusing to end on a . or |, so a stray trailing one before
whitespace 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.

Signed-off-by: Stephen Whitlock <s.whitlock@live.com>
@jshwi jshwi linked an issue Jul 25, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1f7936a) to head (775bc43).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jshwi
jshwi merged commit 775bc43 into master Jul 25, 2026
21 checks passed
@jshwi
jshwi deleted the 1015-sphinx-inline-type-rejected-when-it-contains-an-ellipsis-or-quotes branch July 25, 2026 04:55
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.

sphinx inline type rejected when it contains an ellipsis or quotes

1 participant