diff --git a/pyproject.toml b/pyproject.toml index 77ee042a73..9eb3d6a382 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -280,8 +280,6 @@ module = [ "tests.test_theming.test_theming", # tests/test_transforms "tests.test_transforms.test_transforms_post_transforms_images", - # tests/test_util - "tests.test_util.test_util_docutils", # tests/test_writers "tests.test_writers.test_docutilsconf", ] diff --git a/tests/test_util/test_util_docutils.py b/tests/test_util/test_util_docutils.py index e44d508bfa..ef281c1852 100644 --- a/tests/test_util/test_util_docutils.py +++ b/tests/test_util/test_util_docutils.py @@ -17,6 +17,8 @@ from sphinx.util.docutils import ( ) if TYPE_CHECKING: + from pathlib import Path + from sphinx.builders import Builder from sphinx.testing.util import SphinxTestApp @@ -41,7 +43,7 @@ def test_register_node() -> None: assert not hasattr(nodes.SparseNodeVisitor, 'depart_custom_node') -def test_SphinxFileOutput(tmp_path): +def test_SphinxFileOutput(tmp_path: Path) -> None: content = 'Hello Sphinx World' # write test.txt at first @@ -79,16 +81,16 @@ def test_SphinxTranslator(app: SphinxTestApp) -> None: self.called: list[str] = [] super().__init__(document, builder) - def visit_document(self, node): + def visit_document(self, node: nodes.document) -> None: pass - def depart_document(self, node): + def depart_document(self, node: nodes.document) -> None: pass - def visit_inline(self, node): + def visit_inline(self, node: nodes.inline) -> None: self.called.append('visit_inline') - def depart_inline(self, node): + def depart_inline(self, node: nodes.inline) -> None: self.called.append('depart_inline') document = new_document('')