mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 21:44:18 +02:00
add repr
This commit is contained in:
parent
5914a09170
commit
66ae3fbfea
2 changed files with 6 additions and 0 deletions
|
|
@ -96,6 +96,9 @@ class Resource(FastMCPComponent, abc.ABC):
|
|||
}
|
||||
return MCPResource(**kwargs | overrides)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"{self.__class__.__name__}(uri={self.uri!r}, name={self.name!r}, description={self.description!r}, tags={self.tags})"
|
||||
|
||||
|
||||
class FunctionResource(Resource):
|
||||
"""A resource that defers data loading by wrapping a function.
|
||||
|
|
|
|||
|
|
@ -37,3 +37,6 @@ class FastMCPComponent(FastMCPBaseModel):
|
|||
return False
|
||||
assert isinstance(other, type(self))
|
||||
return self.model_dump() == other.model_dump()
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"{self.__class__.__name__}(name={self.name!r}, description={self.description!r}, tags={self.tags})"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue