From 286e8fc9eb6fceb70703c7a698c314c5aad0ca41 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 10:41:51 +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/routing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index ca589f487..0eb60d71a 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -531,7 +531,11 @@ class APIRoute(routing.Route): self.description = description or inspect.cleandoc(self.endpoint.__doc__ or "") # if a "form feed" character (page break) is found in the description text, # truncate description text to the content preceding the first "form feed" - self.description = self.description.split("\f")[0].strip() if type(self.description) is str else self.description + self.description = ( + self.description.split("\f")[0].strip() + if type(self.description) is str + else self.description + ) response_fields = {} for additional_status_code, response in self.responses.items(): assert isinstance(response, dict), "An additional response must be a dict"