Skip to content
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

Replace Literal and Protocol with runtime-referable symbols. #651

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

junkmd
Copy link
Collaborator

@junkmd junkmd commented Nov 2, 2024

This is an improvement for static typing.

When supporting versions earlier than Python 3.8, we used tricks combining hints.pyi and type-hinting by string literals to utilize Literal and Protocol.

Since version 1.4.7, support for versions earlier than Python 3.8 has been dropped, so Literal and Protocol can now be used directly from typing.

Dead version bridges in hints.pyi have also been removed.

and add the typing symbol to `shelllink`.
from `hints` to `tools.codegenerator.typeannotator`.
@junkmd junkmd added the typing related to Python static typing system label Nov 2, 2024
@junkmd junkmd added this to the 1.4.9 milestone Nov 2, 2024
junkmd added a commit to junkmd/pywinauto that referenced this pull request Nov 2, 2024
@junkmd junkmd merged commit e62a7e9 into enthought:main Nov 2, 2024
49 checks passed
@junkmd junkmd deleted the protocols_and_literals branch November 2, 2024 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typing related to Python static typing system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant