Skip to content

Commit

Permalink
Add type hints to conftest.py (#2469)
Browse files Browse the repository at this point in the history
Co-authored-by: Scirlat Danut <[email protected]>
  • Loading branch information
TechNiick and Scirlat Danut authored Feb 4, 2024
1 parent 5acee62 commit 88331bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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(
Expand Down

0 comments on commit 88331bd

Please sign in to comment.