Skip to content

Commit 813bd3b

Browse files
Remove mypy overrides for tests/test_extensions/test_ext_viewcode.py (sphinx-doc#13774)
Co-authored-by: Adam Turner <[email protected]>
1 parent 00d5f48 commit 813bd3b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ module = [
269269
"tests.test_extensions.test_ext_intersphinx_cache",
270270
"tests.test_extensions.test_ext_math",
271271
"tests.test_extensions.test_ext_napoleon",
272-
"tests.test_extensions.test_ext_viewcode",
273272
# tests/test_markup
274273
"tests.test_markup.test_markup",
275274
"tests.test_markup.test_parser",

tests/test_extensions/test_ext_viewcode.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
import pygments
1010
import pytest
1111

12-
from sphinx.testing.util import SphinxTestApp
13-
1412
if TYPE_CHECKING:
13+
from sphinx.application import Sphinx
1514
from sphinx.testing.util import SphinxTestApp
1615

1716

@@ -130,7 +129,9 @@ def test_linkcode(app: SphinxTestApp) -> None:
130129

131130
@pytest.mark.sphinx('html', testroot='ext-viewcode-find', freshenv=True)
132131
def test_local_source_files(app: SphinxTestApp) -> None:
133-
def find_source(app, modname):
132+
def find_source(
133+
app: Sphinx, modname: str
134+
) -> tuple[str, dict[str, tuple[str, int, int]]]:
134135
if modname == 'not_a_package':
135136
source = app.srcdir / 'not_a_package/__init__.py'
136137
tags = {
@@ -174,7 +175,7 @@ def find_source(app, modname):
174175

175176

176177
@pytest.mark.sphinx('html', testroot='ext-viewcode-find-package', freshenv=True)
177-
def test_find_local_package_import_path(app, status, warning):
178+
def test_find_local_package_import_path(app: Sphinx) -> None:
178179
app.build(force_all=True)
179180
result = (app.outdir / 'index.html').read_text(encoding='utf8')
180181

0 commit comments

Comments
 (0)