Skip to content

Commit 7a85847

Browse files
authored
fix: make tool annotations read-only
1 parent 8d909a9 commit 7a85847

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/toolbox-core/src/toolbox_core/sync_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __annotations__(self) -> dict[str, Any]: # type: ignore[override]
8585
# Standard Python object attributes like __doc__ are technically "writable".
8686
# But not defining a setter function makes this a read-only property.
8787
# Mypy flags this issue in the type checks.
88-
return self.__async_tool.__annotations__
88+
return self.__async_tool.__annotations__.copy()
8989

9090
def __call__(self, *args: Any, **kwargs: Any) -> str:
9191
"""

0 commit comments

Comments
 (0)