From 060ca045712d7741929e3a6a35da8f9f8393668b Mon Sep 17 00:00:00 2001 From: Ruslan Markelov <160320740+ImJuike@users.noreply.github.com> Date: Thu, 22 Jan 2026 04:47:16 +0300 Subject: [PATCH] style: PEP 8 fixes in openapi/utils.py Added missing trailing commas in 'validation_error_response_definition' Fixed string concatenation in warning message to use implicit concatenation --- fastapi/openapi/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastapi/openapi/utils.py b/fastapi/openapi/utils.py index 75ff261025..e561cb5c30 100644 --- a/fastapi/openapi/utils.py +++ b/fastapi/openapi/utils.py @@ -61,7 +61,7 @@ validation_error_response_definition = { "title": "Detail", "type": "array", "items": {"$ref": REF_PREFIX + "ValidationError"}, - } + }, }, } @@ -242,8 +242,8 @@ def get_openapi_operation_metadata( operation_id = route.operation_id or route.unique_id if operation_id in operation_ids: message = ( - f"Duplicate Operation ID {operation_id} for function " - + f"{route.endpoint.__name__}" + f"Duplicate Operation ID {operation_id} " + f"for function {route.endpoint.__name__}" ) file_name = getattr(route.endpoint, "__globals__", {}).get("__file__") if file_name: