typing.get_type_hints
cannot resolve forward references in cls.__init__
annotations
#1021
Labels
Typing
Typing/stub/Mypy/PyRight related bugs.
The is related to #593/#760. Because #760 populates the generated
__init__
method's globals at the time that the class is created, new globals aren't visible toget_type_hints
by default.Example code demonstrating this:
This last call raises an error.
I've got a workaround for this in the code where I hit this, but it really wasn't obvious at first what was going on.
The text was updated successfully, but these errors were encountered: