File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1605,7 +1605,10 @@ def func1(*args: *Ts): pass
16051605 self .assertEqual (gth (func1 ), {'args' : Unpack [Ts ]})
16061606
16071607 def func2 (* args : * tuple [int , str ]): pass
1608- self .assertEqual (gth (func2 ), {'args' : Unpack [tuple [int , str ]]})
1608+ hint = gth (func2 )['args' ]
1609+ self .assertIsInstance (hint , types .GenericAlias )
1610+ self .assertEqual (hint .__args__ [0 ], int )
1611+ self .assertIs (hint .__unpacked__ , True )
16091612
16101613 class CustomVariadic (Generic [* Ts ]): pass
16111614
@@ -1620,7 +1623,10 @@ def func1(*args: '*Ts'): pass
16201623 {'args' : Unpack [Ts ]})
16211624
16221625 def func2 (* args : '*tuple[int, str]' ): pass
1623- self .assertEqual (gth (func2 ), {'args' : Unpack [tuple [int , str ]]})
1626+ hint = gth (func2 )['args' ]
1627+ self .assertIsInstance (hint , types .GenericAlias )
1628+ self .assertEqual (hint .__args__ [0 ], int )
1629+ self .assertIs (hint .__unpacked__ , True )
16241630
16251631 class CustomVariadic (Generic [* Ts ]): pass
16261632
You can’t perform that action at this time.
0 commit comments