Skip to content

Type annotation infrastructure and initial typing for qtbot.py #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

herobank110
Copy link

@herobank110 herobank110 commented May 22, 2025

Initial version of adding type annotations to the library.

  • infrastructure of mypy in precommit (ci and local type checking)

  • Typing focused around qtboy.py to start with

  • Note: qt objects are typed with aliases refering to Any - this may be upgraded in future to use correct types.

@herobank110 herobank110 marked this pull request as draft May 22, 2025 22:39
@herobank110 herobank110 mentioned this pull request May 22, 2025
@herobank110 herobank110 changed the title Type annotation test Type annotation infrastructure and initial typing for qtbot.py Jun 8, 2025
@@ -617,9 +668,9 @@ def captureExceptions(self):
with capture_exceptions() as exceptions:
yield exceptions

capture_exceptions = captureExceptions
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: removed this line becausemypy gave a warning about this also being assigned in the constructor here: https://github.com/pytest-dev/pytest-qt/blob/master/src/pytestqt/qtbot.py#L153

@herobank110 herobank110 marked this pull request as ready for review June 8, 2025 20:14
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.

2 participants