@@ -365,24 +365,155 @@ help: Add `id` to function signature
365365note: This is an unsafe fix and may change runtime behavior
366366
367367FAST003 Parameter `import` appears in route path, but not in `get_import` signature
368- --> FAST003.py:261 :20
368+ --> FAST003.py:266 :20
369369 |
370- 260 | # https:// github.com/astral-sh/ruff/issues/20941
371- 261 | @app.get("/imports /{import }")
370+ 265 | # https:// github.com/astral-sh/ruff/issues/20941
371+ 266 | @app.get("/imports /{import }")
372372 | ^^^^^^^^
373- 262 | async def get_import():
374- 263 | ...
373+ 267 | async def get_import():
374+ 268 | ...
375375 |
376376help: Add `import` to function signature
377377
378378FAST003 Parameter `__debug__` appears in route path, but not in `get_debug` signature
379- --> FAST003.py:265 :18
379+ --> FAST003.py:270 :18
380380 |
381- 263 | ...
382- 264 |
383- 265 | @app.get("/debug /{__debug__ }")
381+ 268 | ...
382+ 269 |
383+ 270 | @app.get("/debug /{__debug__ }")
384384 | ^^^^^^^^^^^
385- 266 | async def get_debug():
386- 267 | ...
385+ 271 | async def get_debug():
386+ 272 | ...
387387 |
388388help: Add `__debug__` to function signature
389+
390+ FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing_vararg` signature
391+ --> FAST003.py:278:19
392+ |
393+ 277 | # Errors: vararg-only and kwarg-only functions
394+ 278 | @app.get("/things /{thing_id }")
395+ | ^^^^^^^^^^
396+ 279 | async def read_thing_vararg(*query : str ): ...
397+ |
398+ help: Add `thing_id` to function signature
399+ 276 |
400+ 277 | # Errors: vararg-only and kwarg-only functions
401+ 278 | @app.get("/things /{thing_id }")
402+ - async def read_thing_vararg(*query : str ): ...
403+ 279 + async def read_thing_vararg(thing_id , *query : str ): ...
404+ 280 |
405+ 281 | @app.get("/things /{thing_id }")
406+ 282 | async def read_thing_kwarg(**query : str ): ...
407+ note: This is an unsafe fix and may change runtime behavior
408+
409+ FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing_kwarg` signature
410+ --> FAST003.py:281:19
411+ |
412+ 279 | async def read_thing_vararg(*query : str ): ...
413+ 280 |
414+ 281 | @app.get("/things /{thing_id }")
415+ | ^^^^^^^^^^
416+ 282 | async def read_thing_kwarg(**query : str ): ...
417+ |
418+ help: Add `thing_id` to function signature
419+ 279 | async def read_thing_vararg(*query : str ): ...
420+ 280 |
421+ 281 | @app.get("/things /{thing_id }")
422+ - async def read_thing_kwarg(**query : str ): ...
423+ 282 + async def read_thing_kwarg(thing_id , **query : str ): ...
424+ 283 |
425+ 284 | @app.get("/things /{thing_id }")
426+ 285 | async def read_thing_vararg_kwarg(*args , **kwargs ): ...
427+ note: This is an unsafe fix and may change runtime behavior
428+
429+ FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing_vararg_kwarg` signature
430+ --> FAST003.py:284:19
431+ |
432+ 282 | async def read_thing_kwarg(**query : str ): ...
433+ 283 |
434+ 284 | @app.get("/things /{thing_id }")
435+ | ^^^^^^^^^^
436+ 285 | async def read_thing_vararg_kwarg(*args , **kwargs ): ...
437+ |
438+ help: Add `thing_id` to function signature
439+ 282 | async def read_thing_kwarg(**query : str ): ...
440+ 283 |
441+ 284 | @app.get("/things /{thing_id }")
442+ - async def read_thing_vararg_kwarg(*args , **kwargs ): ...
443+ 285 + async def read_thing_vararg_kwarg(thing_id , *args , **kwargs ): ...
444+ 286 |
445+ 287 | # Errors: positional-only parameter edge cases
446+ 288 | @app.get("/things /{thing_id }")
447+ note: This is an unsafe fix and may change runtime behavior
448+
449+ FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing_posonly` signature
450+ --> FAST003.py:288:19
451+ |
452+ 287 | # Errors: positional-only parameter edge cases
453+ 288 | @app.get("/things /{thing_id }")
454+ | ^^^^^^^^^^
455+ 289 | async def read_thing_posonly(query : str , /): ...
456+ |
457+ help: Add `thing_id` to function signature
458+ 286 |
459+ 287 | # Errors: positional-only parameter edge cases
460+ 288 | @app.get("/things /{thing_id }")
461+ - async def read_thing_posonly(query : str , /): ...
462+ 289 + async def read_thing_posonly(query : str , /, thing_id ): ...
463+ 290 |
464+ 291 | @app.get("/things /{thing_id }")
465+ 292 | async def read_thing_posonly_trailing(query : str , /,): ...
466+ note: This is an unsafe fix and may change runtime behavior
467+
468+ FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing_posonly_trailing` signature
469+ --> FAST003.py:291:19
470+ |
471+ 289 | async def read_thing_posonly(query : str , /): ...
472+ 290 |
473+ 291 | @app.get("/things /{thing_id }")
474+ | ^^^^^^^^^^
475+ 292 | async def read_thing_posonly_trailing(query : str , /,): ...
476+ |
477+ help: Add `thing_id` to function signature
478+ 289 | async def read_thing_posonly(query : str , /): ...
479+ 290 |
480+ 291 | @app.get("/things /{thing_id }")
481+ - async def read_thing_posonly_trailing(query : str , /,): ...
482+ 292 + async def read_thing_posonly_trailing(query : str , /, thing_id ,): ...
483+ 293 |
484+ 294 | @app.get("/things /{thing_id }")
485+ 295 | async def read_thing_posonly_default(query : str = " " , /): ...
486+ note: This is an unsafe fix and may change runtime behavior
487+
488+ FAST003 Parameter `thing_id` appears in route path, but not in `read_thing_posonly_default` signature
489+ --> FAST003.py:294:19
490+ |
491+ 292 | async def read_thing_posonly_trailing(query : str , /,): ...
492+ 293 |
493+ 294 | @app.get("/things /{thing_id }")
494+ | ^^^^^^^^^^
495+ 295 | async def read_thing_posonly_default(query : str = " " , /): ...
496+ |
497+ help: Add `thing_id` to function signature
498+
499+ FAST003 Parameter `thing_id` appears in route path, but not in `read_thing_posonly_default_trailing` signature
500+ --> FAST003.py:297:19
501+ |
502+ 295 | async def read_thing_posonly_default(query : str = " " , /): ...
503+ 296 |
504+ 297 | @app.get("/things /{thing_id }")
505+ | ^^^^^^^^^^
506+ 298 | async def read_thing_posonly_default_trailing(query : str = " " , /,): ...
507+ |
508+ help: Add `thing_id` to function signature
509+
510+ FAST003 Parameter `thing_id` appears in route path, but not in `read_thing_posonly_with_regular` signature
511+ --> FAST003.py:300:19
512+ |
513+ 298 | async def read_thing_posonly_default_trailing(query : str = " " , /,): ...
514+ 299 |
515+ 300 | @app.get("/things /{thing_id }")
516+ | ^^^^^^^^^^
517+ 301 | async def read_thing_posonly_with_regular(query : str = " " , /, x = None ): ...
518+ |
519+ help: Add `thing_id` to function signature
0 commit comments