Browse Source

🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

pull/9837/head
pre-commit-ci[bot] 8 months ago
parent
commit
147ca63107
  1. 1
      fastapi/dependencies/utils.py
  2. 5
      tests/test_tutorial/test_query_params/test_tutorial007_py310.py

1
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)

5
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]},
}

Loading…
Cancel
Save