Skip to content

Commit 4a2692e

Browse files
committed
pyproject(mypy): add sphinx_fonts to ignore_missing_imports
why: sphinx_fonts is a local docs/_ext extension, not an installed package — mypy cannot resolve it at analysis time. what: - Add sphinx_fonts to [[tool.mypy.overrides]] ignore_missing_imports - Add mypy ignore-errors directive to test_sphinx_fonts.py
1 parent dae7e96 commit 4a2692e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ files = [
135135
"tests",
136136
]
137137

138+
[[tool.mypy.overrides]]
139+
module = ["sphinx_fonts"]
140+
ignore_missing_imports = true
141+
138142
[tool.coverage.run]
139143
branch = true
140144
parallel = true

tests/docs/_ext/test_sphinx_fonts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Tests for sphinx_fonts Sphinx extension."""
22

3+
# mypy: ignore-errors
34
from __future__ import annotations
45

56
import logging

0 commit comments

Comments
 (0)