diff --git a/pyproject.toml b/pyproject.toml index e3418ab98a2..fc40ff5e965 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -244,8 +244,6 @@ module = [ # tests/test_theming "tests.test_theming.test_templating", "tests.test_theming.test_theming", - # tests/test_transforms - "tests.test_transforms.test_transforms_post_transforms_images", # tests/test_writers "tests.test_writers.test_docutilsconf", ] diff --git a/tests/test_transforms/test_transforms_post_transforms_images.py b/tests/test_transforms/test_transforms_post_transforms_images.py index c6c80f59c62..6a0e4e9ae8b 100644 --- a/tests/test_transforms/test_transforms_post_transforms_images.py +++ b/tests/test_transforms/test_transforms_post_transforms_images.py @@ -1,12 +1,16 @@ from __future__ import annotations from types import SimpleNamespace +from typing import TYPE_CHECKING from docutils import nodes from sphinx.transforms.post_transforms.images import ImageConverter from sphinx.util.docutils import new_document +if TYPE_CHECKING: + from pathlib import Path + WEBP_DATA = ( b'RIFF\xa8\x01\x00\x00WEBPVP8X\n\x00\x00\x00' b"\x10\x00\x00\x00\x0f\x00\x00\x0f\x00\x00ALPH\xc3\x00\x00\x00\x01'" @@ -33,7 +37,7 @@ ) -def test_guess_mimetype_webp(tmp_path): +def test_guess_mimetype_webp(tmp_path: Path) -> None: document = new_document('') document.settings.env = SimpleNamespace(srcdir=tmp_path) converter = ImageConverter(document)