Skip to content
Discussion options

You must be logged in to vote

...heh. You caught @beartype red-pawed there. Get it, red-pawed? Instead of red-handed? I'll stop now.

So, TypeVar is a known weakness for all runtime type-checkers – @beartype, @pydantic, and typeguard alike. TypeVar was never intended to be supported at runtime, because full-blown TypeVar support kinda requires crazy stuff like capturing the full graph of all types across your entire app stack via mypy-style static analysis — which is too computationally insane to reasonably (read: efficiently) perform at runtime. Like all of the other guys, @beartype mostly just silently reduces TypeVar type hints to typing.Any. What I'm saying is...... @beartype mostly just silently ignores TypeVar ty…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by k4ml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants