From caa38dad453905c968ecf1c021e2867f7f4a17e3 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 26 Nov 2023 01:03:08 -0500 Subject: fix broken type annotation imports being ignored If an annotation could not be resolved, it's classified as a "missing import" and our configuration ignored it: ``` Skipping analyzing "mesonbuild.backends": module is installed, but missing library stubs or py.typed marker ``` As far as mypy is concerned, this library may or may not exist, but it doesn't have any typing information at all (may need to be installed first). We ignored this because of our docs/ and tools/ thirdparty dependencies, but we really should not. It is trivial to install them, and then enforce that this "just works". By enforcing it, we also make sure typos get caught. --- docs/refman/loaderyaml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/refman') diff --git a/docs/refman/loaderyaml.py b/docs/refman/loaderyaml.py index fc06b0d67..e7ec57a7e 100644 --- a/docs/refman/loaderyaml.py +++ b/docs/refman/loaderyaml.py @@ -41,7 +41,7 @@ class Template: class StrictTemplate(Template): def __init__(self) -> None: - from strictyaml import Map, MapPattern, Optional, Str, Seq, Int, Bool, EmptyList, OrValidator + from strictyaml import Map, MapPattern, Optional, Str, Seq, Int, Bool, EmptyList, OrValidator # type: ignore[import-untyped] d_named_object = { 'name': Str(), -- cgit v1.2.3