Skip to content

Commit 6106a82

Browse files
committed
fix: configure mypy to handle MCP library syntax errors
- Add comprehensive mypy overrides for mcp module - Configure mypy to install types automatically in CI - Exclude .venv directory from type checking - This resolves pattern matching syntax errors from mcp library dependencies
1 parent e124a9a commit 6106a82

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Run Mypy
3737
run: |
3838
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
39-
uv run mypy stackone_ai --exclude stackone_ai/server.py
39+
uv run mypy stackone_ai --exclude stackone_ai/server.py --install-types --non-interactive
4040
else
41-
uv run mypy stackone_ai
41+
uv run mypy stackone_ai --install-types --non-interactive
4242
fi

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ warn_redundant_casts = true
116116
warn_unused_ignores = true
117117
warn_return_any = true
118118
warn_unreachable = true
119+
exclude = [
120+
"^.venv/",
121+
]
119122

120123
[[tool.mypy.overrides]]
121124
module = "bm25s"
@@ -124,3 +127,8 @@ ignore_missing_imports = true
124127
[[tool.mypy.overrides]]
125128
module = "langgraph.*"
126129
ignore_missing_imports = true
130+
131+
[[tool.mypy.overrides]]
132+
module = "mcp.*"
133+
ignore_missing_imports = true
134+
ignore_errors = true

0 commit comments

Comments
 (0)