8000 ♻️ Simplify string format with f-strings in `fastapi/applications.py` by igeni · Pull Request #11335 · fastapi/fastapi · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fastapi/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ async def swagger_ui_html(req: Request) -> HTMLResponse:
oauth2_redirect_url = root_path + oauth2_redirect_url
return get_swagger_ui_html(
openapi_url=openapi_url,
title=self.title + " - Swagger UI",
title=f"{self.title} - Swagger UI",
oauth2_redirect_url=oauth2_redirect_url,
init_oauth=self.swagger_ui_init_oauth,
swagger_ui_parameters=self.swagger_ui_parameters,
Expand All @@ -1043,7 +1043,7 @@ async def redoc_html(req: Request) -> HTMLResponse:
root_path = req.scope.get("root_path", "").rstrip("/")
openapi_url = root_path + self.openapi_url
return get_redoc_html(
openapi_url=openapi_url, title=self.title + " - ReDoc"
openapi_url=openapi_url, title=f"{self.title} - ReDoc"
)

self.add_route(self.redoc_url, redoc_html, include_in_schema=False)
Expand Down
0