@@ -183,33 +183,27 @@ def takes_at_least_two_positional_only(x: int, y: int, /, *args) -> None: ...
183183class SingleElementTuple (tuple[int ]): ...
184184
185185def _ (args : SingleElementTuple) -> None :
186- # TODO : we should emit `[too-many-positional-arguments]` here
187- takes_zero(* args)
186+ takes_zero(* args) # error: [too-many-positional-arguments]
188187
189188 takes_one(* args)
190189
191- # TODO : we should emit `[missing-argument]` on both of these
192- takes_two(* args)
193- takes_two_positional_only(* args)
190+ takes_two(* args) # error: [missing-argument]
191+ takes_two_positional_only(* args) # error: [missing-argument]
194192
195- # TODO : these should both be `[missing-argument]`, not `[invalid-argument-type]`
196- takes_two_different(* args) # error: [invalid-argument-type]
197- takes_two_different_positional_only(* args) # error: [invalid-argument-type]
193+ takes_two_different(* args) # error: [missing-argument]
194+ takes_two_different_positional_only(* args) # error: [missing-argument]
198195
199196 takes_at_least_zero(* args)
200197 takes_at_least_one(* args)
201198
202- # TODO : we should emit `[missing-argument]` on both of these
203- takes_at_least_two(* args)
204- takes_at_least_two_positional_only(* args)
199+ takes_at_least_two(* args) # error: [missing-argument]
200+ takes_at_least_two_positional_only(* args) # error: [missing-argument]
205201
206202class TwoElementIntTuple (tuple[int , int ]): ...
207203
208204def _ (args : TwoElementIntTuple) -> None :
209- # TODO : we should emit `[too-many-positional-arguments]` on both of these
210- takes_zero(* args)
211- takes_one(* args)
212-
205+ takes_zero(* args) # error: [too-many-positional-arguments]
206+ takes_one(* args) # error: [too-many-positional-arguments]
213207 takes_two(* args)
214208 takes_two_positional_only(* args)
215209 takes_two_different(* args) # error: [invalid-argument-type]
@@ -222,40 +216,23 @@ def _(args: TwoElementIntTuple) -> None:
222216class IntStrTuple (tuple[int , str ]): ...
223217
224218def _ (args : IntStrTuple) -> None :
225- # TODO : we should emit `[too-many-positional-arguments]` here
226- takes_zero(* args)
219+ takes_zero(* args) # error: [too-many-positional-arguments]
227220
228- # TODO : this should be `[too-many-positional-arguments]`, not `[invalid-argument-type]`
229- takes_one(* args) # error: [invalid-argument-type]
221+ takes_one(* args) # error: [too-many-positional-arguments]
230222
231- # TODO : we should have one diagnostic for each of these, not two
232- # error: [invalid-argument-type]
233223 # error: [invalid-argument-type]
234224 takes_two(* args)
235225 # error: [invalid-argument-type]
236- # error: [invalid-argument-type]
237226 takes_two_positional_only(* args)
238227
239- # TODO : these are all false positives
240- # error: [invalid-argument-type]
241- # error: [invalid-argument-type]
242228 takes_two_different(* args)
243- # error: [invalid-argument-type]
244- # error: [invalid-argument-type]
245229 takes_two_different_positional_only(* args)
246-
247230 takes_at_least_zero(* args)
248-
249- # TODO : false positive
250- # error: [invalid-argument-type]
251231 takes_at_least_one(* args)
252232
253- # TODO : we should only emit one diagnostic for each of these, not two
254- # error: [invalid-argument-type]
255233 # error: [invalid-argument-type]
256234 takes_at_least_two(* args)
257235 # error: [invalid-argument-type]
258- # error: [invalid-argument-type]
259236 takes_at_least_two_positional_only(* args)
260237```
261238
@@ -377,9 +354,7 @@ def takes_at_least_two_positional_only(x: int, y: int, /, *args) -> None: ...
377354class IntStarInt (tuple[int , * tuple[int , ... ]]): ...
378355
379356def _ (args : IntStarInt) -> None :
380- # TODO : we should emit `[too-many-positional-arguments]` here
381- takes_zero(* args)
382-
357+ takes_zero(* args) # error: [too-many-positional-arguments]
383358 takes_one(* args)
384359 takes_two(* args)
385360 takes_two_positional_only(* args)
@@ -393,50 +368,32 @@ def _(args: IntStarInt) -> None:
393368class IntStarStr (tuple[int , * tuple[str , ... ]]): ...
394369
395370def _ (args : IntStarStr) -> None :
396- # TODO : we should emit `[too-many-positional-arguments]` here
397- takes_zero(* args)
371+ takes_zero(* args) # error: [too-many-positional-arguments]
398372
399- # TODO : false positive
400- # error: [invalid-argument-type]
401373 takes_one(* args)
402374
403- # TODO : we should only emit one diagnostic for each of these, not two
404- # error: [invalid-argument-type]
405375 # error: [invalid-argument-type]
406376 takes_two(* args)
407377 # error: [invalid-argument-type]
408- # error: [invalid-argument-type]
409378 takes_two_positional_only(* args)
410379
411- # TODO : false positives
412- # error: [invalid-argument-type]
413- # error: [invalid-argument-type]
414380 takes_two_different(* args)
415- # error: [invalid-argument-type]
416- # error: [invalid-argument-type]
417381 takes_two_different_positional_only(* args)
418382
419383 takes_at_least_zero(* args)
420384
421- # TODO : false positive
422- # error: [invalid-argument-type]
423385 takes_at_least_one(* args)
424386
425- # TODO : we should only have one diagnostic for each of these, not two
426- # error: [invalid-argument-type]
427387 # error: [invalid-argument-type]
428388 takes_at_least_two(* args)
429389 # error: [invalid-argument-type]
430- # error: [invalid-argument-type]
431390 takes_at_least_two_positional_only(* args)
432391
433392class IntIntStarInt (tuple[int , int , * tuple[int , ... ]]): ...
434393
435394def _ (args : IntIntStarInt) -> None :
436- # TODO : we should emit `[too-many-positional-arguments]` on both of these
437- takes_zero(* args)
438- takes_one(* args)
439-
395+ takes_zero(* args) # error: [too-many-positional-arguments]
396+ takes_one(* args) # error: [too-many-positional-arguments]
440397 takes_two(* args)
441398 takes_two_positional_only(* args)
442399 takes_two_different(* args) # error: [invalid-argument-type]
@@ -449,51 +406,31 @@ def _(args: IntIntStarInt) -> None:
449406class IntIntStarStr (tuple[int , int , * tuple[str , ... ]]): ...
450407
451408def _ (args : IntIntStarStr) -> None :
452- # TODO : we should emit `[too-many-positional-arguments]` here
453- takes_zero(* args)
409+ takes_zero(* args) # error: [too-many-positional-arguments]
454410
455- # TODO : this should be `[too-many-positional-arguments]`, not `invalid-argument-type`
456- takes_one(* args) # error: [invalid-argument-type]
411+ takes_one(* args) # error: [too-many-positional-arguments]
457412
458- # TODO : these are all false positives
459- # error: [invalid-argument-type]
460- # error: [invalid-argument-type]
461413 takes_two(* args)
462- # error: [invalid-argument-type]
463- # error: [invalid-argument-type]
464414 takes_two_positional_only(* args)
465415
466- # TODO : each of these should only have one diagnostic, not two
467- # error: [invalid-argument-type]
468416 # error: [invalid-argument-type]
469417 takes_two_different(* args)
470418 # error: [invalid-argument-type]
471- # error: [invalid-argument-type]
472419 takes_two_different_positional_only(* args)
473420
474421 takes_at_least_zero(* args)
475422
476- # TODO : false positive
477- # error: [invalid-argument-type]
478423 takes_at_least_one(* args)
479424
480- # TODO : these are both false positives
481- # error: [invalid-argument-type]
482- # error: [invalid-argument-type]
483425 takes_at_least_two(* args)
484426
485- # TODO : these are both false positives
486- # error: [invalid-argument-type]
487- # error: [invalid-argument-type]
488427 takes_at_least_two_positional_only(* args)
489428
490429class IntStarIntInt (tuple[int , * tuple[int , ... ], int ]): ...
491430
492431def _ (args : IntStarIntInt) -> None :
493- # TODO : we should emit `[too-many-positional-arguments]` on both of these
494- takes_zero(* args)
495- takes_one(* args)
496-
432+ takes_zero(* args) # error: [too-many-positional-arguments]
433+ takes_one(* args) # error: [too-many-positional-arguments]
497434 takes_two(* args)
498435 takes_two_positional_only(* args)
499436 takes_two_different(* args) # error: [invalid-argument-type]
@@ -506,40 +443,25 @@ def _(args: IntStarIntInt) -> None:
506443class IntStarStrInt (tuple[int , * tuple[str , ... ], int ]): ...
507444
508445def _ (args : IntStarStrInt) -> None :
509- # TODO : we should emit `too-many-positional-arguments` here
510- takes_zero(* args)
446+ takes_zero(* args) # error: [too-many-positional-arguments]
511447
512- # TODO : this should be `too-many-positional-arguments`, not `invalid-argument-type`
513- takes_one(* args) # error: [invalid-argument-type]
448+ takes_one(* args) # error: [too-many-positional-arguments]
514449
515- # TODO : we should only emit one diagnostic for each of these
516- # error: [invalid-argument-type]
517450 # error: [invalid-argument-type]
518451 takes_two(* args)
519452 # error: [invalid-argument-type]
520- # error: [invalid-argument-type]
521453 takes_two_positional_only(* args)
522454
523- # TODO : we should not emit diagnostics for these
524- # error: [invalid-argument-type]
525- # error: [invalid-argument-type]
526455 takes_two_different(* args)
527- # error: [invalid-argument-type]
528- # error: [invalid-argument-type]
529456 takes_two_different_positional_only(* args)
530457
531458 takes_at_least_zero(* args)
532459
533- # TODO : false positive
534- takes_at_least_one(* args) # error: [invalid-argument-type]
460+ takes_at_least_one(* args)
535461
536- # TODO : should only have one diagnostic here
537- # error: [invalid-argument-type]
538462 # error: [invalid-argument-type]
539463 takes_at_least_two(* args)
540464
541- # TODO : should only have one diagnostic here
542- # error: [invalid-argument-type]
543465 # error: [invalid-argument-type]
544466 takes_at_least_two_positional_only(* args)
545467```
0 commit comments