Skip to content

Commit 95b9b3e

Browse files
Remove mypy overrides for tests/test_transforms/test_transforms_post_transforms_images.py (#14070)
Co-authored-by: Adam Turner <[email protected]>
1 parent 815f99b commit 95b9b3e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ module = [
244244
# tests/test_theming
245245
"tests.test_theming.test_templating",
246246
"tests.test_theming.test_theming",
247-
# tests/test_transforms
248-
"tests.test_transforms.test_transforms_post_transforms_images",
249247
]
250248
disallow_untyped_defs = false
251249

tests/test_transforms/test_transforms_post_transforms_images.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
from __future__ import annotations
22

33
from types import SimpleNamespace
4+
from typing import TYPE_CHECKING
45

56
from docutils import nodes
67

78
from sphinx.transforms.post_transforms.images import ImageConverter
89
from sphinx.util.docutils import new_document
910

11+
if TYPE_CHECKING:
12+
from pathlib import Path
13+
1014
WEBP_DATA = (
1115
b'RIFF\xa8\x01\x00\x00WEBPVP8X\n\x00\x00\x00'
1216
b"\x10\x00\x00\x00\x0f\x00\x00\x0f\x00\x00ALPH\xc3\x00\x00\x00\x01'"
@@ -33,7 +37,7 @@
3337
)
3438

3539

36-
def test_guess_mimetype_webp(tmp_path):
40+
def test_guess_mimetype_webp(tmp_path: Path) -> None:
3741
document = new_document('<source>')
3842
document.settings.env = SimpleNamespace(srcdir=tmp_path)
3943
converter = ImageConverter(document)

0 commit comments

Comments
 (0)