Remove mypy overrides for `tests/test_extensions/test_ext_viewcode.py` (#13774)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Adam DangoorandAdam Turner authored and GitHub committed 2025-07-28 12:47:26 +01:00
1 parent 00d5f48beb
commit 813bd3bdf7
2 files changed
+5 -5

No files matched your search

-1
View File
@@ -269,7 +269,6 @@ module = [
"tests.test_extensions.test_ext_intersphinx_cache",
"tests.test_extensions.test_ext_math",
"tests.test_extensions.test_ext_napoleon",
"tests.test_extensions.test_ext_viewcode",
# tests/test_markup
"tests.test_markup.test_markup",
"tests.test_markup.test_parser",
+5 -4
View File
@@ -9,9 +9,8 @@ from typing import TYPE_CHECKING
import pygments
import pytest
from sphinx.testing.util import SphinxTestApp
if TYPE_CHECKING:
from sphinx.application import Sphinx
from sphinx.testing.util import SphinxTestApp
@@ -130,7 +129,9 @@ def test_linkcode(app: SphinxTestApp) -> None:
@pytest.mark.sphinx('html', testroot='ext-viewcode-find', freshenv=True)
def test_local_source_files(app: SphinxTestApp) -> None:
def find_source(app, modname):
def find_source(
app: Sphinx, modname: str
) -> tuple[str, dict[str, tuple[str, int, int]]]:
if modname == 'not_a_package':
source = app.srcdir / 'not_a_package/__init__.py'
tags = {
@@ -174,7 +175,7 @@ def test_local_source_files(app: SphinxTestApp) -> None:
@pytest.mark.sphinx('html', testroot='ext-viewcode-find-package', freshenv=True)
def test_find_local_package_import_path(app, status, warning):
def test_find_local_package_import_path(app: Sphinx) -> None:
app.build(force_all=True)
result = (app.outdir / 'index.html').read_text(encoding='utf8')