Skip to content

Conversation

@h4l
Copy link
Owner

@h4l h4l commented Feb 2, 2025

To avoid the mess and toil of using if TYPE_CHECKING: to import stuff from typing_extensions, we now export all the types we use from a single denokv._pycompat.typing module. This allows the rest of the modules to ignore typing compat issues, and transparently use stuff from typing_extensions where needed (but without depending on typing_extensions).

h4l added 2 commits February 2, 2025 11:35
This allows us to import all type annotations/types/functions from here,
rather than typing or typing_extensions, which lets us handle the
differences between them in one place, without needing if TYPE_CHECKING
everywhere.
@h4l h4l force-pushed the unified-typing-compat branch from 5330161 to 89f6ad5 Compare February 2, 2025 11:37
@h4l h4l merged commit 89f6ad5 into main Feb 2, 2025
23 checks passed
@h4l h4l deleted the unified-typing-compat branch February 2, 2025 11:39
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