mypy: Stop ignoring missing imports

This commit is contained in:
Oleh Prypin
2023-10-29 10:49:15 +01:00
parent b5250bf9e2
commit f31caca339
7 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import re
import subprocess
from typing import TYPE_CHECKING
import ghp_import
import ghp_import # type: ignore
from packaging import version
import mkdocs
+2 -1
View File
@@ -13,7 +13,8 @@ from mkdocs.plugins import BasePlugin
if TYPE_CHECKING:
from mkdocs.config.defaults import MkDocsConfig
from mkdocs.structure.pages import Page
from mkdocs.util.templates import TemplateContext
from mkdocs.utils.templates import TemplateContext
log = logging.getLogger(__name__)
base_path = os.path.dirname(os.path.abspath(__file__))
+1 -1
View File
@@ -13,7 +13,7 @@ if TYPE_CHECKING:
from mkdocs.structure.toc import AnchorLink, TableOfContents
try:
from lunr import lunr
from lunr import lunr # type: ignore
haslunrpy = True
except ImportError:
+1 -1
View File
@@ -17,7 +17,7 @@ try:
has_babel = True
except ImportError: # pragma: no cover
from mkdocs.utils.babel_stub import Locale, UnknownLocaleError
from mkdocs.utils.babel_stub import Locale, UnknownLocaleError # type: ignore
has_babel = False
+1 -1
View File
@@ -1,7 +1,7 @@
import unittest
from unittest import mock
from ghp_import import GhpError
from ghp_import import GhpError # type: ignore
from mkdocs import __version__
from mkdocs.commands import gh_deploy
+2 -2
View File
@@ -6,10 +6,10 @@ import os
import os.path
from typing import IO, TYPE_CHECKING, Any
import mergedeep
import mergedeep # type: ignore
import yaml
import yaml.constructor
import yaml_env_tag
import yaml_env_tag # type: ignore
from mkdocs import exceptions
+1 -1
View File
@@ -150,6 +150,7 @@ matrix.type.features = [
[tool.hatch.envs.types]
dependencies = [
"mypy",
"types-babel",
"types-Jinja2",
"types-Markdown",
"types-PyYAML",
@@ -235,7 +236,6 @@ ignore = ["E501", "E731"]
allow-dict-calls-with-keyword-arguments = true
[tool.mypy]
ignore_missing_imports = true
warn_unreachable = true
no_implicit_optional = true
show_error_codes = true