Message291058
For classes with ForwardRef annotations, typing.get_type_hints is unusable.
As example, we have two files:
a.py:
class Base:
a: 'A'
class A:
pass
b.py:
from a import Base
class MyClass(Base):
b: 'B'
class B:
pass
>>> from typing import get_type_hints
>>> from b import MyClass
>>> get_type_hints(MyClass) # NameError
What should globals/locals be here? |
|
Date |
User |
Action |
Args |
2017-04-03 10:21:14 | simon.percivall | set | recipients:
+ simon.percivall |
2017-04-03 10:21:14 | simon.percivall | set | messageid: <1491214874.69.0.0315417893192.issue29966@psf.upfronthosting.co.za> |
2017-04-03 10:21:14 | simon.percivall | link | issue29966 messages |
2017-04-03 10:21:14 | simon.percivall | create | |
|