Message384332
The following code throws with "NameError: name 'Nested' is not defined".
For reference, it works well when moving class definitions out of the local scope.
import typing
T = typing.TypeVar('T')
def test():
class Nested(typing.Generic[T]):
pass
class Test(typing.Generic[T]):
nested: Nested[T]
typing.get_type_hints(Test) # this throws
test() |
|
Date |
User |
Action |
Args |
2021-01-04 16:55:18 | Fabian.M | set | recipients:
+ Fabian.M |
2021-01-04 16:55:18 | Fabian.M | set | messageid: <1609779318.04.0.39059957238.issue42824@roundup.psfhosted.org> |
2021-01-04 16:55:18 | Fabian.M | link | issue42824 messages |
2021-01-04 16:55:17 | Fabian.M | create | |
|