From 8637d5801dcf98cf6a6297d20331dd8f2de1a7b5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:59:38 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20format?= =?UTF-8?q?=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/openapi/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fastapi/openapi/utils.py b/fastapi/openapi/utils.py index 271acd931..dc35124ee 100644 --- a/fastapi/openapi/utils.py +++ b/fastapi/openapi/utils.py @@ -347,7 +347,9 @@ def get_openapi_path( response_schema = {} route_responses = {str(k): v for k, v in route.responses.items()} - if status_code not in route_responses or not route_responses.get(status_code, {}).get('superimpose'): + if status_code not in route_responses or not route_responses.get( + status_code, {} + ).get("superimpose"): operation.setdefault("responses", {}).setdefault( status_code, {} ).setdefault("content", {}).setdefault(