🎨 Auto format

This commit is contained in:
pre-commit-ci-lite[bot] 2026-02-25 22:09:17 +00:00 committed by GitHub
parent 26a903f1e2
commit c2384c2b2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -17,6 +17,7 @@ from fastapi.exception_handlers import (
from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError
from fastapi.logger import logger
from fastapi.middleware.asyncexitstack import AsyncExitStackMiddleware
from fastapi.openapi.asyncapi_utils import get_asyncapi
from fastapi.openapi.docs import (
get_asyncapi_html,
get_redoc_html,
@ -24,7 +25,6 @@ from fastapi.openapi.docs import (
get_swagger_ui_oauth2_redirect_html,
)
from fastapi.openapi.utils import get_openapi
from fastapi.openapi.asyncapi_utils import get_asyncapi
from fastapi.params import Depends
from fastapi.types import DecoratedCallable, IncEx
from fastapi.utils import generate_unique_id
@ -978,7 +978,9 @@ class FastAPI(Starlette):
assert self.version, "A version must be provided for OpenAPI, e.g.: '2.1.0'"
if self.asyncapi_url:
assert self.title, "A title must be provided for AsyncAPI, e.g.: 'My API'"
assert self.version, "A version must be provided for AsyncAPI, e.g.: '2.1.0'"
assert self.version, (
"A version must be provided for AsyncAPI, e.g.: '2.1.0'"
)
# TODO: remove when discarding the openapi_prefix parameter
if openapi_prefix:
logger.warning(

View File

@ -103,4 +103,3 @@ def get_asyncapi(
output["externalDocs"] = external_docs
return jsonable_encoder(output, by_alias=True, exclude_none=True)