On 27 May 2019, at 22:44, Till firstname.lastname@example.org wrote:
Thanks to Ivan and Jakub I was able to land a (python 3.7 and up) implementation in typing_extension. If you get the library directly from GitHub you can try it out and give your feedback. Till
Happy to help. I just modified Injector locally to use this and everything works as expected – nicely done!
One thing that I’m curious about – what’s the recommended way to see if we’re dealing with Annotated-wrapped type or just a type at runtime? This is what I did:
from typing_extensions import _Annotated
things = get_type_hints(…, include_extras=True) for k, v in things.items(): if isinstance(v, _Annotated): # special logic here