Skip to content

Commit 0fd75fc

Browse files
committed
fix: resolve remaining mypy issues in server.py
- Remove unused type: ignore comment for try block - Add type: ignore for MCP decorator functions to handle untyped decorators - Set mypy python_version to 3.10 to properly handle pattern matching syntax - All mypy checks now pass successfully
1 parent 6106a82 commit 0fd75fc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
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 --install-types --non-interactive
39+
uv run mypy stackone_ai --exclude stackone_ai/server.py
4040
else
41-
uv run mypy stackone_ai --install-types --non-interactive
41+
uv run mypy stackone_ai
4242
fi

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ select = [
106106
]
107107

108108
[tool.mypy]
109-
python_version = "3.9"
109+
python_version = "3.10"
110110
disallow_untyped_defs = true
111111
disallow_incomplete_defs = true
112112
check_untyped_defs = true

stackone_ai/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
)
1717
)
1818

19-
try: # type: ignore[unreachable]
19+
try:
2020
import mcp.types as types
2121
from mcp.server import NotificationOptions, Server
2222
from mcp.server.models import InitializationOptions
@@ -56,7 +56,7 @@ def tool_needs_account_id(tool_name: str) -> bool:
5656
return True
5757

5858

59-
@app.list_tools()
59+
@app.list_tools() # type: ignore[misc]
6060
async def list_tools() -> list[Tool]:
6161
"""List all available StackOne tools as MCP tools."""
6262
if not toolset:
@@ -114,7 +114,7 @@ async def list_tools() -> list[Tool]:
114114
) from e
115115

116116

117-
@app.call_tool()
117+
@app.call_tool() # type: ignore[misc]
118118
async def call_tool(
119119
name: str, arguments: dict[str, Any]
120120
) -> list[TextContent | ImageContent | EmbeddedResource]:

0 commit comments

Comments
 (0)