Skip to content

Commit f6be96f

Browse files
committed
mypy fix
1 parent a320f35 commit f6be96f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ jobs:
2929
run: |
3030
uv run --python ${{ matrix.python-version }} --python-preference only-system ruff format --check
3131
uv run --python ${{ matrix.python-version }} --python-preference only-system ruff check
32+
- name: Mypy
33+
# Disable until fix released https://github.com/pydantic/pydantic/pull/10979
34+
if: ${{ matrix.python-version != '3.13' }}
35+
run: |
3236
uv run --python ${{ matrix.python-version }} --python-preference only-system mypy

src/langchain_mcp/toolkit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class MCPTool(BaseTool):
6868
"""
6969

7070
session: ClientSession
71-
args_schema: type[pydantic.BaseModel]
7271
handle_tool_error: bool | str | Callable[[ToolException], str] | None = True
7372

7473
@t.override
@@ -89,4 +88,5 @@ async def _arun(self, *args: t.Any, **kwargs: t.Any) -> t.Any:
8988
@t.override
9089
@property
9190
def tool_call_schema(self) -> type[pydantic.BaseModel]:
91+
assert self.args_schema is not None # noqa: S101
9292
return self.args_schema

0 commit comments

Comments
 (0)