This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mhils
Recipients gvanrossum, kj, mhils
Date 2021-08-16.20:12:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629144768.74.0.189265553521.issue44926@roundup.psfhosted.org>
In-reply-to
Content
@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?
History
Date User Action Args
2021-08-16 20:12:48mhilssetrecipients: + mhils, gvanrossum, kj
2021-08-16 20:12:48mhilssetmessageid: <1629144768.74.0.189265553521.issue44926@roundup.psfhosted.org>
2021-08-16 20:12:48mhilslinkissue44926 messages
2021-08-16 20:12:48mhilscreate