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

Drop 'typing_extensions', use modern annotations #100

Merged
merged 1 commit into from
Jun 29, 2024
Merged

Conversation

ikalnytskyi
Copy link
Owner

Since introduction of from __future__ import annotations in the project sources, the annotations evaluations aren't happening at runtime, which means we can start using modern type annotation techniques, such as | operand instead of Union.

It also means we can completely rely on the typing module and drop typing_extensions because all imports are now under TYPE_CHECKING, and their usage in signatures are not evaluated at runtime.

@ikalnytskyi ikalnytskyi force-pushed the chore/typing branch 5 times, most recently from 48970cc to d946bf0 Compare June 29, 2024 09:07
Since introduction of `from __future__ import annotations` in the
project sources, the annotations evaluations aren't happening at
runtime, which means we can start using modern type annotation
techniques, such as | operand instead of Union.

It also means we can completely rely on the `typing` module and drop
`typing_extensions` because all imports are now under TYPE_CHECKING, and
their usage in signatures are not evaluated at runtime.
@ikalnytskyi ikalnytskyi merged commit 0d3f993 into master Jun 29, 2024
15 checks passed
@ikalnytskyi ikalnytskyi deleted the chore/typing branch June 29, 2024 09:29
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.

1 participant