@@ -92,8 +92,8 @@ def _(args: list[int]) -> None:
9292 takes_one(* args)
9393 takes_two(* args)
9494 takes_two_positional_only(* args)
95- takes_two_different(* args) # error: [invalid-argument-type]
96- takes_two_different_positional_only(* args) # error: [invalid-argument-type]
95+ takes_two_different(* args) # error: [invalid-argument-type]
96+ takes_two_different_positional_only(* args) # error: [invalid-argument-type]
9797 takes_at_least_zero(* args)
9898 takes_at_least_one(* args)
9999 takes_at_least_two(* args)
@@ -104,8 +104,8 @@ def _(args: tuple[int, ...]) -> None:
104104 takes_one(* args)
105105 takes_two(* args)
106106 takes_two_positional_only(* args)
107- takes_two_different(* args) # error: [invalid-argument-type]
108- takes_two_different_positional_only(* args) # error: [invalid-argument-type]
107+ takes_two_different(* args) # error: [invalid-argument-type]
108+ takes_two_different_positional_only(* args) # error: [invalid-argument-type]
109109 takes_at_least_zero(* args)
110110 takes_at_least_one(* args)
111111 takes_at_least_two(* args)
@@ -129,40 +129,40 @@ def takes_at_least_two_positional_only(x: int, y: int, /, *args) -> None: ...
129129# Test all of the above with a number of different splatted argument types
130130
131131def _ (args : tuple[int ]) -> None :
132- takes_zero(* args) # error: [too-many-positional-arguments]
132+ takes_zero(* args) # error: [too-many-positional-arguments]
133133 takes_one(* args)
134- takes_two(* args) # error: [missing-argument]
135- takes_two_positional_only(* args) # error: [missing-argument]
136- takes_two_different(* args) # error: [missing-argument]
137- takes_two_different_positional_only(* args) # error: [missing-argument]
134+ takes_two(* args) # error: [missing-argument]
135+ takes_two_positional_only(* args) # error: [missing-argument]
136+ takes_two_different(* args) # error: [missing-argument]
137+ takes_two_different_positional_only(* args) # error: [missing-argument]
138138 takes_at_least_zero(* args)
139139 takes_at_least_one(* args)
140- takes_at_least_two(* args) # error: [missing-argument]
141- takes_at_least_two_positional_only(* args) # error: [missing-argument]
140+ takes_at_least_two(* args) # error: [missing-argument]
141+ takes_at_least_two_positional_only(* args) # error: [missing-argument]
142142
143143def _ (args : tuple[int , int ]) -> None :
144- takes_zero(* args) # error: [too-many-positional-arguments]
145- takes_one(* args) # error: [too-many-positional-arguments]
144+ takes_zero(* args) # error: [too-many-positional-arguments]
145+ takes_one(* args) # error: [too-many-positional-arguments]
146146 takes_two(* args)
147147 takes_two_positional_only(* args)
148- takes_two_different(* args) # error: [invalid-argument-type]
149- takes_two_different_positional_only(* args) # error: [invalid-argument-type]
148+ takes_two_different(* args) # error: [invalid-argument-type]
149+ takes_two_different_positional_only(* args) # error: [invalid-argument-type]
150150 takes_at_least_zero(* args)
151151 takes_at_least_one(* args)
152152 takes_at_least_two(* args)
153153 takes_at_least_two_positional_only(* args)
154154
155155def _ (args : tuple[int , str ]) -> None :
156- takes_zero(* args) # error: [too-many-positional-arguments]
157- takes_one(* args) # error: [too-many-positional-arguments]
158- takes_two(* args) # error: [invalid-argument-type]
159- takes_two_positional_only(* args) # error: [invalid-argument-type]
156+ takes_zero(* args) # error: [too-many-positional-arguments]
157+ takes_one(* args) # error: [too-many-positional-arguments]
158+ takes_two(* args) # error: [invalid-argument-type]
159+ takes_two_positional_only(* args) # error: [invalid-argument-type]
160160 takes_two_different(* args)
161161 takes_two_different_positional_only(* args)
162162 takes_at_least_zero(* args)
163163 takes_at_least_one(* args)
164- takes_at_least_two(* args) # error: [invalid-argument-type]
165- takes_at_least_two_positional_only(* args) # error: [invalid-argument-type]
164+ takes_at_least_two(* args) # error: [invalid-argument-type]
165+ takes_at_least_two_positional_only(* args) # error: [invalid-argument-type]
166166```
167167
168168### Mixed tuple argument
@@ -187,76 +187,76 @@ def takes_at_least_two_positional_only(x: int, y: int, /, *args) -> None: ...
187187# Test all of the above with a number of different splatted argument types
188188
189189def _ (args : tuple[int , * tuple[int , ... ]]) -> None :
190- takes_zero(* args) # error: [too-many-positional-arguments]
190+ takes_zero(* args) # error: [too-many-positional-arguments]
191191 takes_one(* args)
192192 takes_two(* args)
193193 takes_two_positional_only(* args)
194- takes_two_different(* args) # error: [invalid-argument-type]
195- takes_two_different_positional_only(* args) # error: [invalid-argument-type]
194+ takes_two_different(* args) # error: [invalid-argument-type]
195+ takes_two_different_positional_only(* args) # error: [invalid-argument-type]
196196 takes_at_least_zero(* args)
197197 takes_at_least_one(* args)
198198 takes_at_least_two(* args)
199199 takes_at_least_two_positional_only(* args)
200200
201201def _ (args : tuple[int , * tuple[str , ... ]]) -> None :
202- takes_zero(* args) # error: [too-many-positional-arguments]
202+ takes_zero(* args) # error: [too-many-positional-arguments]
203203 takes_one(* args)
204- takes_two(* args) # error: [invalid-argument-type]
205- takes_two_positional_only(* args) # error: [invalid-argument-type]
204+ takes_two(* args) # error: [invalid-argument-type]
205+ takes_two_positional_only(* args) # error: [invalid-argument-type]
206206 takes_two_different(* args)
207207 takes_two_different_positional_only(* args)
208208 takes_at_least_zero(* args)
209209 takes_at_least_one(* args)
210- takes_at_least_two(* args) # error: [invalid-argument-type]
211- takes_at_least_two_positional_only(* args) # error: [invalid-argument-type]
210+ takes_at_least_two(* args) # error: [invalid-argument-type]
211+ takes_at_least_two_positional_only(* args) # error: [invalid-argument-type]
212212
213213def _ (args : tuple[int , int , * tuple[int , ... ]]) -> None :
214- takes_zero(* args) # error: [too-many-positional-arguments]
215- takes_one(* args) # error: [too-many-positional-arguments]
214+ takes_zero(* args) # error: [too-many-positional-arguments]
215+ takes_one(* args) # error: [too-many-positional-arguments]
216216 takes_two(* args)
217217 takes_two_positional_only(* args)
218- takes_two_different(* args) # error: [invalid-argument-type]
219- takes_two_different_positional_only(* args) # error: [invalid-argument-type]
218+ takes_two_different(* args) # error: [invalid-argument-type]
219+ takes_two_different_positional_only(* args) # error: [invalid-argument-type]
220220 takes_at_least_zero(* args)
221221 takes_at_least_one(* args)
222222 takes_at_least_two(* args)
223223 takes_at_least_two_positional_only(* args)
224224
225225def _ (args : tuple[int , int , * tuple[str , ... ]]) -> None :
226- takes_zero(* args) # error: [too-many-positional-arguments]
227- takes_one(* args) # error: [too-many-positional-arguments]
226+ takes_zero(* args) # error: [too-many-positional-arguments]
227+ takes_one(* args) # error: [too-many-positional-arguments]
228228 takes_two(* args)
229229 takes_two_positional_only(* args)
230- takes_two_different(* args) # error: [invalid-argument-type]
231- takes_two_different_positional_only(* args) # error: [invalid-argument-type]
230+ takes_two_different(* args) # error: [invalid-argument-type]
231+ takes_two_different_positional_only(* args) # error: [invalid-argument-type]
232232 takes_at_least_zero(* args)
233233 takes_at_least_one(* args)
234234 takes_at_least_two(* args)
235235 takes_at_least_two_positional_only(* args)
236236
237237def _ (args : tuple[int , * tuple[int , ... ], int ]) -> None :
238- takes_zero(* args) # error: [too-many-positional-arguments]
239- takes_one(* args) # error: [too-many-positional-arguments]
238+ takes_zero(* args) # error: [too-many-positional-arguments]
239+ takes_one(* args) # error: [too-many-positional-arguments]
240240 takes_two(* args)
241241 takes_two_positional_only(* args)
242- takes_two_different(* args) # error: [invalid-argument-type]
243- takes_two_different_positional_only(* args) # error: [invalid-argument-type]
242+ takes_two_different(* args) # error: [invalid-argument-type]
243+ takes_two_different_positional_only(* args) # error: [invalid-argument-type]
244244 takes_at_least_zero(* args)
245245 takes_at_least_one(* args)
246246 takes_at_least_two(* args)
247247 takes_at_least_two_positional_only(* args)
248248
249249def _ (args : tuple[int , * tuple[str , ... ], int ]) -> None :
250- takes_zero(* args) # error: [too-many-positional-arguments]
251- takes_one(* args) # error: [too-many-positional-arguments]
252- takes_two(* args) # error: [invalid-argument-type]
253- takes_two_positional_only(* args) # error: [invalid-argument-type]
250+ takes_zero(* args) # error: [too-many-positional-arguments]
251+ takes_one(* args) # error: [too-many-positional-arguments]
252+ takes_two(* args) # error: [invalid-argument-type]
253+ takes_two_positional_only(* args) # error: [invalid-argument-type]
254254 takes_two_different(* args)
255255 takes_two_different_positional_only(* args)
256256 takes_at_least_zero(* args)
257257 takes_at_least_one(* args)
258- takes_at_least_two(* args) # error: [invalid-argument-type]
259- takes_at_least_two_positional_only(* args) # error: [invalid-argument-type]
258+ takes_at_least_two(* args) # error: [invalid-argument-type]
259+ takes_at_least_two_positional_only(* args) # error: [invalid-argument-type]
260260```
261261
262262### Argument expansion regression
@@ -296,6 +296,8 @@ def f(x: int, y: int) -> None: ...
296296def f (x : int , y : str , z : int ) -> None : ...
297297def f (* args ): ...
298298
299+ # Test all of the above with a number of different splatted argument types
300+
299301def _ (t : tuple[int , str ]) -> None :
300302 f(* t) # error: [invalid-argument-type]
301303
0 commit comments