Closed Wooza closed 4 years ago
Thanks a lot for posting! Interesting proposition. The only potential "downside" I can think of for adding this is that until now this package didn't have any external dependencies (besides dataclasses for python=3.6.x). I'll check-out their API and test it out, and I'll get back to you in a few days. Should be pretty simple to do, also.
I'm currently working on a project that also makes heavy use of type hints. From what I have seen, the internal API of the typing module is still changed quite often. One of the maintainers of the typing module also has a neat library which provides a more stable API to the typing internals. I suggest to take a look at typing_inspect to avoid accessing internal fields like
__args__
and__origin__
directly. This should reduce implementation overhead and make the library more stable when new python versions are released.