-
Notifications
You must be signed in to change notification settings - Fork 325
Open
Description
Summary
langchain-mcp-adapters seems to have type-hints, but isn’t recognized as typed by mypy because it lacks a py.typed marker (PEP 561).
Steps to reproduce
uv pip install mypy langchain-mcp-adapters --system
uv run mypy -c "from langchain_mcp_adapters.client import MultiServerMCPClient"
Output:
uv run mypy -c "from langchain_mcp_adapters.client import MultiServerMCPClient"
<string>:1: error: Skipping analyzing "langchain_mcp_adapters.client": module is installed, but missing library stubs or py.typed marker [import-untyped]
<string>:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)
[ble: exit 1]Expected
If built with proper type-hints :
No “missing library stubs” error — mypy should use the inline hints.
Fix
- Add an empty
py.typedfile insidelangchain_mcp_adapters/. - Include it in the build:
[tool.setuptools.package-data]
"langchain_mcp_adapters" = ["py.typed"]Should i release a PR, so mypy will recognize the types ?
omriel1, BobMerkus, simon-lighthouse and Tomodo1773
Metadata
Metadata
Assignees
Labels
No labels
