diff -r c27269c0d619 Lib/test/test_typing.py --- a/Lib/test/test_typing.py Wed Nov 09 09:43:37 2016 -0500 +++ b/Lib/test/test_typing.py Wed Nov 09 20:27:39 2016 +0100 @@ -733,10 +733,11 @@ self.assertEqual(repr(Callable[[], List[T]][int]).replace('typing.', ''), 'Callable[[], List[int]]') - def test_generic_forvard_ref(self): - def foobar(x: List[List['T']]): ... + def test_generic_forward_ref(self): + def foobar(x: List[List['CC']]): ... + class CC: ... + self.assertEqual(get_type_hints(foobar, globals(), locals()), {'x': List[List[CC]]}) T = TypeVar('T') - self.assertEqual(get_type_hints(foobar, globals(), locals()), {'x': List[List[T]]}) def barfoo(x: Tuple[T, ...]): ... self.assertIs(get_type_hints(barfoo, globals(), locals())['x'], Tuple[T, ...])