Make typemap_extensions the canonical import for users#78
Merged
Conversation
The point here is to make sure that *clients* import the `typemap.typing` stuff under a different name that `type_eval` internals do, so that `typemap.type_eval` internals can still be typechecked against the real `typemap.typing` while client code will import `typemap_extensions` and will be able to see the proper mypy/typeshed magic for it. If we want to keep things under `typemap`, we could leave the public version as `typemap.typing` and make the internal module `typemap._typing_internals`. Thoughts? Also do some fixups so that qblike_2 and fastapilike_2 basically pass typechecking.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dnwpark
reviewed
Feb 5, 2026
Contributor
dnwpark
left a comment
There was a problem hiding this comment.
Looks fine, just some reveal_type stuff that seems out of place?
|
|
||
| if TYPE_CHECKING: | ||
| pubhero: Public[Hero] | ||
| reveal_type(pubhero) # noqa |
| comments=True, | ||
| author=True, | ||
| ) | ||
| reveal_type(_test_select) # noqa |
dnwpark
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The point here is to make sure that clients import the
typemap.typingstuff under a different name thattype_evalinternals do, so that
typemap.type_evalinternals can still betypechecked against the real
typemap.typingwhile client code willimport
typemap_extensionsand will be able to see the propermypy/typeshed magic for it.
If we want to keep things under
typemap, we could leave the publicversion as
typemap.typingand make the internal moduletypemap._typing_internals. Thoughts?Also do some fixups so that qblike_2 and fastapilike_2 basically pass
typechecking.