Enable mypy strict mode with per-module exemptions - #667
Merged
Merged
Conversation
Pierre-Sassoulas
added this pull request to stack #670
September 29, 2026 13:27
Pierre-Sassoulas
force-pushed
the
mypy-strict
branch
from
September 29, 2026 13:31
bb2de23 to
fd9a282
Compare
nicoddemus
approved these changes
Sep 29, 2026
Turn on ``strict = True`` so new code must be fully typed, and list the modules that do not pass yet in per-module overrides. Each list should shrink as annotations are added, until ``py.typed`` can drop ``partial``. Also fix the few errors that ``disallow_incomplete_defs``, ``warn_return_any`` and ``no_implicit_reexport`` found, and set ``mypy_path = src`` so single files resolve ``pytestqt``. Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the Counter helper to module level so tests can use it as a type. Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The annotations replace the ':type pytester:' docstring lines. Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The traceback in CapturedException is now Optional, matching what sys.excepthook actually receives. Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reuse CapturedException for its parameters with Unpack instead of spelling the signature out inline. Refs #595 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pierre-Sassoulas
force-pushed
the
mypy-strict
branch
from
September 29, 2026 14:24
fd9a282 to
c53926a
Compare
7 of 10 tasks
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.
Added typing on the simple one: pytestqt.utils, pytestqt.exceptions, test_qtest_proxies, test_qtbot_pep8_aliases, test_screenshot, test_wait_until, test_logging
Still not typed: