I haven't commented on these, as I don't use type annotations in the "usual" way.,
but:
I maintain
pydantic which uses type annotations to provide runtime data validation.
I maintain in in-house system kinda similar to pydantic that doesn't use type annotations for validation, but does use them for other things (mostly serializing/deserializing to/from JSON), and other kinds of data validation.
> using `typing.get_type_hints()` is not a good replacement for type annotations that are accessible as python objects.
Absolutely. It is very, very, handy to simply have the object itself easily accessible.
-CHB
--
Christopher Barker, PhD (Chris)
Python Language Consulting
- Teaching
- Scientific Software Development
- Desktop GUI and Web Development
- wxPython, numpy, scipy, Cython