fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540)

* pin pydantic-monty to 0.0.8

* rename tool/prompt/resource base modules to avoid decorator name shadow

* add sys.modules shims for old submodule import paths

* preserve original module paths in deprecation warnings

* clarify when sys.modules shims can be removed
This commit is contained in:
Jeremiah Lowin 2026-03-17 18:11:42 -04:00 committed by GitHub
commit 360c9c31e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
107 changed files with 202 additions and 178 deletions

View file

@ -7,7 +7,7 @@ from pydantic import Field
from fastmcp import Context, FastMCP
from fastmcp.client import Client
from fastmcp.tools.tool import ToolResult
from fastmcp.tools.base import ToolResult
from fastmcp.utilities.types import Image
fastmcp_server = FastMCP()