Message 326164 - Python tracker (original) (raw)

[Adding to nosy people who were on the original email]

Copying (part of) my response from the email thread:

These work: print(get_type_hints(Bar.init, globals())) print(get_type_hints(Bar.init, Bar.module))

But I agree that maybe doing something with dataclasses to address this would be good. Especially as the first one requires being in the same module as Foo.

See this for Yury's self-described "hack-ish fix we can use" until we do something better:

https://gist.github.com/1st1/37fdd3cc84cd65b9af3471b935b722df