From 147ca631076f0443bc26344721fafabdb6d1dca4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 13:57:10 +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/dependencies/utils.py | 1 + .../test_query_params/test_tutorial007_py310.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index e8e3466a8..5bf6bcb96 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -329,6 +329,7 @@ def add_non_field_param_to_dependency( return True return None + def remove_invalid(v: Any, handler: Callable[[Any], Any]) -> Any: try: return handler(v) diff --git a/tests/test_tutorial/test_query_params/test_tutorial007_py310.py b/tests/test_tutorial/test_query_params/test_tutorial007_py310.py index 235992399..8b5c075e2 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial007_py310.py +++ b/tests/test_tutorial/test_query_params/test_tutorial007_py310.py @@ -22,9 +22,7 @@ def test_foo_needy_very(client: TestClient): def test_just_string_not_scalar_mapping(client: TestClient): - response = client.get( - "/query/mixed-type-params?&query=2&foo=1&bar=3&foo=2&foo=baz" - ) + response = client.get("/query/mixed-type-params?&query=2&foo=1&bar=3&foo=2&foo=baz") assert response.status_code == 200 assert response.json() == { "query": 2, @@ -32,4 +30,3 @@ def test_just_string_not_scalar_mapping(client: TestClient): "mapping_query_int": {"bar": 3}, "sequence_mapping_int": {"bar": [3], "foo": [1, 2]}, } -