The following code gives a RecursionError in python 3.7.0 (runs fine in 3.6.4, giving the answer {'return': typing.Sequence[typing.Union[str, typing.Sequence[typing.Union[str, _ForwardRef('Foo')]]]]})
import typing
Foo = typing.Sequence[typing.Union[str, "Foo"]]
def a() -> Foo:
...
typing.get_type_hints(a)