chore: enable import-untyped and import-not-found mypy checks

Remove global ignore_missing_imports and the import-untyped disable,
replacing them with targeted per-package overrides for third-party
libraries that lack stubs (pcbnew, skip, sexpdata, cairosvg, kipy,
schematic). Also add python/ to mypy_path so internal modules resolve.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Eugene Mikhantyev
2026-04-05 21:24:00 +01:00
parent 25f856024c
commit 5d1477f548

View File

@@ -15,13 +15,11 @@ line_length = 100
python_version = "3.10" python_version = "3.10"
warn_return_any = false warn_return_any = false
warn_unused_configs = true warn_unused_configs = true
ignore_missing_imports = true
check_untyped_defs = false check_untyped_defs = false
disallow_untyped_defs = false disallow_untyped_defs = false
explicit_package_bases = true explicit_package_bases = true
mypy_path = "." mypy_path = ".:python"
disable_error_code = [ disable_error_code = [
"import-untyped",
"arg-type", "arg-type",
"attr-defined", "attr-defined",
"union-attr", "union-attr",
@@ -37,3 +35,20 @@ disable_error_code = [
"return-value", "return-value",
"operator", "operator",
] ]
[[tool.mypy.overrides]]
module = [
"pcbnew",
"pcbnew.*",
"skip",
"skip.*",
"sexpdata",
"sexpdata.*",
"cairosvg",
"cairosvg.*",
"kipy",
"kipy.*",
"schematic",
"schematic.*",
]
ignore_missing_imports = true