]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Add type hints to `conftest.py` (#2469)
authorScirlat Danut <danut.scirlat@gmail.com>
Sun, 4 Feb 2024 17:13:09 +0000 (19:13 +0200)
committerGitHub <noreply@github.com>
Sun, 4 Feb 2024 17:13:09 +0000 (10:13 -0700)
Co-authored-by: Scirlat Danut <scirlatdanut@scirlats-mini.lan>
tests/conftest.py

index bc8feb7d7d1bb982e92dc0aec05bb10e191fb406..224f4ac52dc8604bdacc1e1b9fae785177112f44 100644 (file)
@@ -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(