import inspect
import typing as t


class Foo:
    pass


def f() -> Foo:
    pass


def g() -> "Foo":
    pass


spec = inspect.getfullargspec(f)
print(spec.annotations["return"])

spec = inspect.getfullargspec(g)
spec.annotations.update(t.get_type_hints(g))
print(spec.annotations["return"])

spec = inspect.getfullargspec(g)
globalns = g.__globals__
localns = globalns
print(t._eval_type(t.ForwardRef(spec.annotations["return"]), globalns, localns))

f760d09e5efaebab75eb43c75f2e1e16fd42366a
<mask token>


class Foo:
    pass


<mask token>


def g() ->'Foo':
    pass


<mask token>

<mask token>


class Foo:
    pass


def f() ->Foo:
    pass


def g() ->'Foo':
    pass


<mask token>
print(spec.annotations['return'])
<mask token>
spec.annotations.update(t.get_type_hints(g))
print(spec.annotations['return'])
<mask token>
print(t._eval_type(t.ForwardRef(spec.annotations['return']), globalns, localns)
    )

<mask token>


class Foo:
    pass


def f() ->Foo:
    pass


def g() ->'Foo':
    pass


spec = inspect.getfullargspec(f)
print(spec.annotations['return'])
spec = inspect.getfullargspec(g)
spec.annotations.update(t.get_type_hints(g))
print(spec.annotations['return'])
spec = inspect.getfullargspec(g)
globalns = g.__globals__
localns = globalns
print(t._eval_type(t.ForwardRef(spec.annotations['return']), globalns, localns)
    )

import inspect
import typing as t


class Foo:
    pass


def f() ->Foo:
    pass


def g() ->'Foo':
    pass


spec = inspect.getfullargspec(f)
print(spec.annotations['return'])
spec = inspect.getfullargspec(g)
spec.annotations.update(t.get_type_hints(g))
print(spec.annotations['return'])
spec = inspect.getfullargspec(g)
globalns = g.__globals__
localns = globalns
print(t._eval_type(t.ForwardRef(spec.annotations['return']), globalns, localns)
    )

import inspect
import typing as t


class Foo:
    pass


def f() -> Foo:
    pass


def g() -> "Foo":
    pass


spec = inspect.getfullargspec(f)
print(spec.annotations["return"])

spec = inspect.getfullargspec(g)
spec.annotations.update(t.get_type_hints(g))
print(spec.annotations["return"])

spec = inspect.getfullargspec(g)
globalns = g.__globals__
localns = globalns
print(t._eval_type(t.ForwardRef(spec.annotations["return"]), globalns, localns))
