From 127ebf54d94e1fe6acec49b00c5f3cd24cc742bc Mon Sep 17 00:00:00 2001 From: Angel Date: Mon, 1 Jun 2026 22:02:32 -0400 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=BF=AE=E5=A4=8D=20mypy=20=E6=89=BE?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=8F=AF=E9=80=89=E4=BE=9D=E8=B5=96=20tree?= =?UTF-8?q?=5Fsitter=20=E5=AF=BC=E8=87=B4=E7=9A=84=20CI=20=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tree-sitter 系列依赖位于 ast 可选依赖组,CI 仅安装 .[dev] 不含该组, mypy 静态检查 treesitter_extractor.py 时报 import-not-found。新增 per-module override 忽略该有意不安装的可选依赖的缺失导入。 --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 3ace067..6eca35f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,3 +101,7 @@ python_version = "3.11" strict = true mypy_path = "." explicit_package_bases = true + +[[tool.mypy.overrides]] +module = "tree_sitter.*" +ignore_missing_imports = true