File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ def visit(self, node: ast.AST) -> None:
101101 elif isinstance (node , (ast .Tuple , ast .List )):
102102 for n in node .elts :
103103 self .visit (n )
104+ elif isinstance (node , ast .Starred ) and isinstance (node .ctx , ast .Load ):
105+ self .visit (node .value )
104106 elif isinstance (node , ast .Constant ) and isinstance (node .value , str ):
105107 self .visit_annotation_string (node )
106108 elif isinstance (node , ast .Name ):
Original file line number Diff line number Diff line change @@ -128,6 +128,20 @@ class FooDict(TypedDict):
128128 ),
129129]
130130
131+ if sys .version_info >= (3 , 11 ):
132+ # PEP646 tests
133+ examples += [
134+ (
135+ textwrap .dedent ("""
136+ if TYPE_CHECKING:
137+ Ts = TypeVarTuple("Ts")
138+
139+ x: tuple[*Ts]
140+ """ ),
141+ {'5:10 ' + TC200 .format (annotation = 'Ts' )},
142+ )
143+ ]
144+
131145if sys .version_info >= (3 , 12 ):
132146 # PEP695 tests
133147 examples += [
You can’t perform that action at this time.
0 commit comments