Skip to content

Type annotation test #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

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

herobank110
Copy link

No description provided.

@herobank110 herobank110 marked this pull request as draft May 22, 2025 22:39
@herobank110 herobank110 mentioned this pull request May 22, 2025
@@ -13,6 +14,11 @@
CallbackCalledTwiceError,
)

if TYPE_CHECKING:
from qtpy.QtWidgets import QWidget
Copy link
Member

Choose a reason for hiding this comment

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

Does qtpy provide useful types?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure we can provide useful types for Qt classes for now... as commented in #417 (comment), I would focus on typing non-Qt things for now and getting the infrastructure in place.

Copy link
Author

@herobank110 herobank110 Jun 3, 2025

Choose a reason for hiding this comment

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

Does qtpy provide useful types?

Qtpy provides all the expected classes and with some common API, mostly relying on conditional imports of the actual qt in your environment. This way I believe it would use whichever underlying qt that came from the testing matrix in tox.

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure we can provide useful types for Qt classes for now... as commented in #417 (comment), I would focus on typing non-Qt things for now and getting the infrastructure in place.

Would the precommit check be sufficient infrastructure? That way it runs locally as well as CI. Or shall I look into a separate CI linting stage?

Copy link
Member

Choose a reason for hiding this comment

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

pre-commit is enough. 👍

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.

None yet

2 participants