Skip to content

Make typemap_extensions the canonical import for users#78

Merged
msullivan merged 2 commits intomainfrom
typemap_extensions
Feb 5, 2026
Merged

Make typemap_extensions the canonical import for users#78
msullivan merged 2 commits intomainfrom
typemap_extensions

Conversation

@msullivan
Copy link
Collaborator

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 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.
@msullivan msullivan requested review from 1st1 and dnwpark February 5, 2026 01:19
@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
python-typemap Ready Ready Preview, Comment Feb 5, 2026 1:37am

Copy link
Contributor

@dnwpark dnwpark left a comment

Choose a reason for hiding this comment

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

Looks fine, just some reveal_type stuff that seems out of place?


if TYPE_CHECKING:
pubhero: Public[Hero]
reveal_type(pubhero) # noqa
Copy link
Contributor

Choose a reason for hiding this comment

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

?

comments=True,
author=True,
)
reveal_type(_test_select) # noqa
Copy link
Contributor

Choose a reason for hiding this comment

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

?

@msullivan msullivan merged commit 27ca663 into main Feb 5, 2026
4 of 5 checks passed
@msullivan msullivan deleted the typemap_extensions branch February 5, 2026 01:36
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