🎨 Auto format

This commit is contained in:
pre-commit-ci-lite[bot] 2026-03-02 13:42:25 +00:00 committed by GitHub
parent 3f065f95ed
commit 99f8602e86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -9,7 +9,9 @@ auth_code_router = APIRouter()
@auth_code_router.get("/private-route")
async def private_route(token: str | None = Security(auth_code_scheme, scopes=["admin"])):
async def private_route(
token: str | None = Security(auth_code_scheme, scopes=["admin"]),
):
return {"token": token}
@ -39,7 +41,9 @@ def test_oauth2_authorization_code_bearer_lazy_initialize():
authorization_code_flow = openapi.json()["components"]["securitySchemes"][
"OAuth2AuthorizationCodeBearer"
]["flows"]["authorizationCode"]
assert authorization_code_flow["authorizationUrl"] == "https://example.com/authorize"
assert (
authorization_code_flow["authorizationUrl"] == "https://example.com/authorize"
)
assert authorization_code_flow["tokenUrl"] == "https://example.com/oauth/token"
assert authorization_code_flow["scopes"] == {"admin": "Admin access"}