From 88331bd5f8e07e26b318f499283947bf14b55c90 Mon Sep 17 00:00:00 2001 From: Scirlat Danut Date: Sun, 4 Feb 2024 19:13:09 +0200 Subject: [PATCH] Add type hints to `conftest.py` (#2469) Co-authored-by: Scirlat Danut --- tests/conftest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index bc8feb7d7..224f4ac52 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,18 @@ import functools +from typing import Any, Callable, Dict import pytest from starlette.testclient import TestClient +TestClientFactory = Callable[..., TestClient] + @pytest.fixture -def test_client_factory(anyio_backend_name, anyio_backend_options): +def test_client_factory( + anyio_backend_name: str, + anyio_backend_options: Dict[str, Any], +) -> TestClientFactory: # anyio_backend_name defined by: # https://anyio.readthedocs.io/en/stable/testing.html#specifying-the-backends-to-run-on return functools.partial(