Add type hints to `conftest.py` (#2469)

Co-authored-by: Scirlat Danut <scirlatdanut@scirlats-mini.lan>
This commit is contained in:
Scirlat Danut 2024-02-04 19:13:09 +02:00 committed by GitHub
parent 5acee62377
commit 88331bd5f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -1,12 +1,18 @@
import functools import functools
from typing import Any, Callable, Dict
import pytest import pytest
from starlette.testclient import TestClient from starlette.testclient import TestClient
TestClientFactory = Callable[..., TestClient]
@pytest.fixture @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: # anyio_backend_name defined by:
# https://anyio.readthedocs.io/en/stable/testing.html#specifying-the-backends-to-run-on # https://anyio.readthedocs.io/en/stable/testing.html#specifying-the-backends-to-run-on
return functools.partial( return functools.partial(