MichaelKim0407 / flake8-use-fstring

MIT License
51 stars 7 forks source link

Should not trigger on route decorator with path parameter #23

Closed Afizullah closed 2 years ago

Afizullah commented 2 years ago
from fastapi import FastAPI

app = FastAPI()

@app.get('/items/{item_id}') # FS003
async def read_item(item_id: int):
    return {'item_id': item_id}

I get app/main.py:5:10: FS003 f-string missing prefix which should not happen :/

MichaelKim0407 commented 2 years ago

Please go through README and make sure you understand the designed behavior of this plugin.