Closed guacs closed 11 months ago
heh I had problems writing a test for this and then I noticed that I've already been cheating:
if (annot := p.annotation) is Container or annot == "svcs.Container":
get_type_hints is a bit slow and janky (cf other issue 😬) would you be OK if I just add "Container"
to it and call it a day?
I think I have a proper fix that should work for most use cases. I'll raise a PR and you can check if you like that approach?
fixed by #55! 🎉
A minimal reproduction:
The reason this fails is because
inspect.signature
does not resolve stringified annotations by default.