Message399675
@Guido van Rossum: Yes, GH-27017 is the same as #41249 in the initial post. There are also some cases where we don't even have a ForwardRef though:
foo.py:
```
import typing
FooType: typing.TypeAlias = "Foo"
class Foo:
pass
```
bar.py:
```
import typing
import foo
def func3(x: foo.FooType):
pass
print(typing.get_type_hints(func3)) # NameError: name 'Foo' is not defined.
```
In this example, `FooType` is just a regular str (with unknown origin). That's a case where get_type_hints just needs to give up? |
|
Date |
User |
Action |
Args |
2021-08-16 20:12:48 | mhils | set | recipients:
+ mhils, gvanrossum, kj |
2021-08-16 20:12:48 | mhils | set | messageid: <1629144768.74.0.189265553521.issue44926@roundup.psfhosted.org> |
2021-08-16 20:12:48 | mhils | link | issue44926 messages |
2021-08-16 20:12:48 | mhils | create | |
|