Skip to content

Commit fa93388

Browse files
committed
Remove mypy overrides for test_transforms_move_module_targets
1 parent a27f375 commit fa93388

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ module = [
283283
"tests.test_theming.test_templating",
284284
"tests.test_theming.test_theming",
285285
# tests/test_transforms
286-
"tests.test_transforms.test_transforms_move_module_targets",
287286
"tests.test_transforms.test_transforms_post_transforms_images",
288287
"tests.test_transforms.test_transforms_reorder_nodes",
289288
# tests/test_util

tests/test_transforms/test_transforms_move_module_targets.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
from __future__ import annotations
22

3+
from typing import TYPE_CHECKING
4+
35
import pytest
46
from docutils import nodes
57

68
from sphinx import addnodes
79
from sphinx.testing.util import SphinxTestApp
810
from sphinx.transforms import MoveModuleTargets
911

12+
if TYPE_CHECKING:
13+
from pathlib import Path
14+
1015
CONTENT_PY = """\
1116
move-module-targets
1217
===================
@@ -29,7 +34,7 @@
2934
],
3035
)
3136
@pytest.mark.usefixtures('rollback_sysmodules')
32-
def test_move_module_targets(tmp_path, content):
37+
def test_move_module_targets(tmp_path: Path, content: str) -> None:
3338
# Test for the MoveModuleTargets transform
3439
tmp_path.joinpath('conf.py').touch()
3540
tmp_path.joinpath('index.rst').write_text(content, encoding='utf-8')
@@ -48,7 +53,7 @@ def test_move_module_targets(tmp_path, content):
4853

4954

5055
@pytest.mark.usefixtures('rollback_sysmodules')
51-
def test_move_module_targets_no_section(tmp_path):
56+
def test_move_module_targets_no_section(tmp_path: Path) -> None:
5257
# Test for the MoveModuleTargets transform
5358
tmp_path.joinpath('conf.py').touch()
5459
tmp_path.joinpath('index.rst').write_text(
@@ -63,7 +68,7 @@ def test_move_module_targets_no_section(tmp_path):
6368

6469

6570
@pytest.mark.usefixtures('rollback_sysmodules')
66-
def test_move_module_targets_disabled(tmp_path):
71+
def test_move_module_targets_disabled(tmp_path: Path) -> None:
6772
# Test for the MoveModuleTargets transform
6873
tmp_path.joinpath('conf.py').touch()
6974
tmp_path.joinpath('index.rst').write_text(CONTENT_PY, encoding='utf-8')

0 commit comments

Comments
 (0)