Skip to content

Remove redundant type annotations from Sphinx docstrings - #671

Merged
Pierre-Sassoulas merged 3 commits into
mainfrom
docstring-types
Sep 29, 2026
Merged

Pierre-Sassoulas merged 3 commits into
mainfrom
docstring-types

Conversation

@Pierre-Sassoulas

Copy link
Copy Markdown
Member

Last bullet point of #610

nicoddemus
nicoddemus previously approved these changes Sep 29, 2026
@Pierre-Sassoulas
Pierre-Sassoulas force-pushed the docstring-types branch 2 times, most recently from 723bddc to 78199c6 Compare September 29, 2026 14:34
Base automatically changed from future-annotations to main September 29, 2026 15:19
Pierre-Sassoulas and others added 3 commits September 29, 2026 17:21
Annotate _QtMessageCapture.records and the signal name helpers of
wait_signal, and drop the now redundant types from their docstrings.
SignalInstance moves to wait_signal so both modules can use it.

Refs #610

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use autodoc_typehints = "description" and drop the types from the QtBot
docstrings. The Qt aliases are mapped by name so the docs keep showing
QWidget and friends instead of Any. Sphinx 9 does not resolve those
aliases when nested, so the two affected parameters keep a :type: field.

The QTest proxy methods are documented by hand in the class docstring,
without a Python signature, so they keep their types.

Refs #610

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #610

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Pierre-Sassoulas
Pierre-Sassoulas merged commit 0fbbf11 into main Sep 29, 2026
65 checks passed
@Pierre-Sassoulas
Pierre-Sassoulas deleted the docstring-types branch September 29, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants