From 6071d250d34d851ef86bbad764e63a7aaf06970a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 12:12:54 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/routing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index 604d39790..ac90f1f27 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -1194,7 +1194,9 @@ class APIRoute(routing.Route): methods = effective_context.methods if methods: method = scope["method"] - method_is_allowed = method in methods or self._is_head_for_get(scope, methods) + method_is_allowed = method in methods or self._is_head_for_get( + scope, methods + ) if not method_is_allowed: headers = {"Allow": ", ".join(self._allow_methods(methods))} if "app" in scope: