-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violations
Description
Summary
The fix for fast-api-unused-path-parameter (FAST003) introduces a syntax error when the path parameter is a Python keyword or __debug__. The diagnostic is still correct but it can’t be fixed automatically. Example:
$ cat >fast003.py <<'# EOF'
from fastapi import FastAPI
app = FastAPI()
@app.get("/imports/{import}")
async def get_import(): ...
# EOF
$ ruff --isolated check fast003.py --select FAST003 --unsafe-fixes --output-format concise -q
fast003.py:3:20: FAST003 [*] Parameter `import` appears in route path, but not in `get_import` signature
$ ruff --isolated check fast003.py --select FAST003 --unsafe-fixes --diff 2>&1 | grep error:
error: Fix introduced a syntax error. Reverting all changes.Version
ruff 0.14.1 (2bffef5 2025-10-16)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violations