⬆️ Upgrade configuration for Ruff v0.2.0 (#11075)

This commit is contained in:
Charlie Marsh
2024-03-26 12:56:53 -04:00
committed by GitHub
parent b0dd4f7bfc
commit 5ccc869fee
44 changed files with 76 additions and 76 deletions

View File

@@ -9,14 +9,14 @@ app = FastAPI()
@app.get("/hidden_cookie")
async def hidden_cookie(
hidden_cookie: Optional[str] = Cookie(default=None, include_in_schema=False)
hidden_cookie: Optional[str] = Cookie(default=None, include_in_schema=False),
):
return {"hidden_cookie": hidden_cookie}
@app.get("/hidden_header")
async def hidden_header(
hidden_header: Optional[str] = Header(default=None, include_in_schema=False)
hidden_header: Optional[str] = Header(default=None, include_in_schema=False),
):
return {"hidden_header": hidden_header}
@@ -28,7 +28,7 @@ async def hidden_path(hidden_path: str = Path(include_in_schema=False)):
@app.get("/hidden_query")
async def hidden_query(
hidden_query: Optional[str] = Query(default=None, include_in_schema=False)
hidden_query: Optional[str] = Query(default=None, include_in_schema=False),
):
return {"hidden_query": hidden_query}

View File

@@ -14,7 +14,7 @@ def get_client():
@app.post("/items/")
async def read_items(
q: Annotated[str | None, Form(regex="^fixedquery$")] = None
q: Annotated[str | None, Form(regex="^fixedquery$")] = None,
):
if q:
return f"Hello {q}"

View File

@@ -14,7 +14,7 @@ def get_client():
@app.get("/items/")
async def read_items(
q: Annotated[str | None, Query(regex="^fixedquery$")] = None
q: Annotated[str | None, Query(regex="^fixedquery$")] = None,
):
if q:
return f"Hello {q}"