mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
Add flake8-comprehensions linter (#157)
This commit is contained in:
@@ -38,7 +38,7 @@ async def get_ret():
|
||||
@app.get("/")
|
||||
@cache(namespace="test", expire=10)
|
||||
async def index():
|
||||
return dict(ret=await get_ret())
|
||||
return {"ret": await get_ret()}
|
||||
|
||||
|
||||
@app.get("/clear")
|
||||
@@ -58,7 +58,7 @@ async def get_data(request: Request, response: Response):
|
||||
@cache(namespace="test", expire=10)
|
||||
def blocking():
|
||||
time.sleep(2)
|
||||
return dict(ret=42)
|
||||
return {"ret": 42}
|
||||
|
||||
|
||||
@app.get("/datetime")
|
||||
|
||||
Reference in New Issue
Block a user