From 22dc61c695e18d02cdf07a92528f4c0d6e4cd216 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 10:54:02 +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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index 6dd7d0fe4..188ad22d3 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -211,7 +211,7 @@ def get_request_handler( is_coroutine = ( asyncio.iscoroutinefunction(dependant.call) or callable(dependant.call) - and hasattr(dependant.call, "__call__") + and callable(dependant.call) and inspect.iscoroutinefunction(dependant.call.__call__) ) is_body_form = body_field and isinstance(body_field.field_info, params.Form)