Skip to content

Commit 5a73bf6

Browse files
Disallow untyped defs in tests/test_util/test_util_images.py (#13543)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
1 parent ad85bf8 commit 5a73bf6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ module = [
290290
"tests.test_util.test_util",
291291
"tests.test_util.test_util_display",
292292
"tests.test_util.test_util_docutils",
293-
"tests.test_util.test_util_images",
294293
"tests.test_util.test_util_inventory",
295294
# tests/test_writers
296295
"tests.test_writers.test_docutilsconf",

tests/test_util/test_util_images.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111
parse_data_uri,
1212
)
1313

14+
TYPE_CHECKING = False
15+
if TYPE_CHECKING:
16+
from pathlib import Path
17+
1418
GIF_FILENAME = 'img.gif'
1519
PNG_FILENAME = 'img.png'
1620
PDF_FILENAME = 'img.pdf'
1721
TXT_FILENAME = 'index.txt'
1822

1923

20-
def test_get_image_size(rootdir):
24+
def test_get_image_size(rootdir: Path) -> None:
2125
assert get_image_size(rootdir / 'test-root' / GIF_FILENAME) == (200, 181)
2226
assert get_image_size(rootdir / 'test-root' / PNG_FILENAME) == (200, 181)
2327
assert get_image_size(rootdir / 'test-root' / PDF_FILENAME) is None

0 commit comments

Comments
 (0)