π The fast, Pythonic way to build MCP servers and clients.
Remove extra equal dunders
Jeremiah Lowin5914a09170e5
diff --git a/src/fastmcp/resources/resource.py b/src/fastmcp/resources/resource.pyindex ad25ec10d..55706fd13 100644--- a/src/fastmcp/resources/resource.py+++ b/src/fastmcp/resources/resource.py@@ -86,12 +86,6 @@ class Resource(FastMCPComponent, abc.ABC):"""Read the resource content."""pass- def __eq__(self, other: object) -> bool:- if type(self) is not type(other):- return False- assert isinstance(other, type(self))- return self.model_dump() == other.model_dump()-def to_mcp_resource(self, **overrides: Any) -> MCPResource:"""Convert the resource to an MCPResource."""kwargs = {diff --git a/src/fastmcp/resources/template.py b/src/fastmcp/resources/template.pyindex b0da1d74a..c8faaa188 100644--- a/src/fastmcp/resources/template.py+++ b/src/fastmcp/resources/template.py@@ -115,12 +115,6 @@ class ResourceTemplate(FastMCPComponent):tags=self.tags,)- def __eq__(self, other: object) -> bool:- if type(self) is not type(other):- return False- assert isinstance(other, type(self))- return self.model_dump() == other.model_dump()-def to_mcp_template(self, **overrides: Any) -> MCPResourceTemplate:"""Convert the resource template to an MCPResourceTemplate."""kwargs = {diff --git a/src/fastmcp/tools/tool.py b/src/fastmcp/tools/tool.pyindex 0859cac99..2b334f617 100644--- a/src/fastmcp/tools/tool.py+++ b/src/fastmcp/tools/tool.py@@ -74,12 +74,6 @@ class Tool(FastMCPComponent, ABC):serializer=serializer,)- def __eq__(self, other: object) -> bool:- if type(self) is not type(other):- return False- assert isinstance(other, type(self))- return self.model_dump() == other.model_dump()-@abstractmethodasync def run(self, arguments: dict[str, Any]