bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156)

This commit is contained in:
Batuhan Taskaya 2020-05-18 21:23:48 +03:00 committed by GitHub
parent e6578a226d
commit 2135e10dc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View file

@ -275,6 +275,9 @@ class AnnotationsFutureTestCase(unittest.TestCase):
eq("dict[str, int]")
eq("set[str,]")
eq("tuple[str, ...]")
eq("tuple[(str, *types)]")
eq("tuple[str, int, (str, int)]")
eq("tuple[(*int, str, str, (str, int))]")
eq("tuple[str, int, float, dict[str, int]]")
eq("slice[0]")
eq("slice[0:1]")