diff --git a/conftest.py b/conftest.py index 1d776f8d..a319285e 100644 --- a/conftest.py +++ b/conftest.py @@ -30,9 +30,7 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: @pytest.fixture(name="make_image_file") -def fixture_make_image_file( - high_quality_image: io.BytesIO, -) -> Generator[None]: +def fixture_make_image_file(high_quality_image: io.BytesIO) -> Generator[None]: """Make an image file available in the test directory. The path of this file matches the path in the documentation. @@ -45,9 +43,7 @@ def fixture_make_image_file( @pytest.fixture(name="mock_vws") -def fixture_mock_vws( - monkeypatch: pytest.MonkeyPatch, -) -> Generator[None]: +def fixture_mock_vws(monkeypatch: pytest.MonkeyPatch) -> Generator[None]: """Yield a mock VWS. The keys used here match the keys in the documentation. diff --git a/tests/conftest.py b/tests/conftest.py index 3831755a..99ed568f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,7 @@ import io from collections.abc import Generator from pathlib import Path -from typing import IO, BinaryIO, Literal +from typing import IO, Literal import pytest from mock_vws import MockVWS @@ -53,7 +53,7 @@ def fixture_image_file( high_quality_image: io.BytesIO, tmp_path: Path, request: pytest.FixtureRequest, -) -> Generator[BinaryIO]: +) -> Generator[IO[bytes]]: """ An image file object. """ @@ -69,7 +69,7 @@ def fixture_image_file( def image( request: pytest.FixtureRequest, high_quality_image: io.BytesIO, - image_file: BinaryIO, + image_file: IO[bytes], ) -> IO[bytes]: """ An image in any of the types that the API accepts.