Skip to content

Commit 104ea2b

Browse files
authored
Update sync_tool.py
1 parent 7a85847 commit 104ea2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import asyncio
16+
import types
1617
from asyncio import AbstractEventLoop
1718
from inspect import Signature
1819
from threading import Thread
@@ -85,7 +86,7 @@ def __annotations__(self) -> dict[str, Any]: # type: ignore[override]
8586
# Standard Python object attributes like __doc__ are technically "writable".
8687
# But not defining a setter function makes this a read-only property.
8788
# Mypy flags this issue in the type checks.
88-
return self.__async_tool.__annotations__.copy()
89+
return types.MappingProxyType(self.__async_tool.__annotations__)
8990

9091
def __call__(self, *args: Any, **kwargs: Any) -> str:
9192
"""

0 commit comments

Comments
 (0)