Skip to content

Commit d6c0b34

Browse files
committed
change string to str and in arg type
1 parent 53655ea commit d6c0b34

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ def _schema_to_docstring(schema: ToolSchema) -> str:
102102
return docstring
103103
docstring += "\n\nArgs:"
104104
for p in schema.parameters:
105-
docstring += f"\n {p.name} ({p.type}): {p.description}"
105+
docstring += (
106+
f"\n {p.name} ({p.to_param().annotation.__name__}): {p.description}"
107+
)
106108
return docstring
107109

108110
def __copy(

packages/toolbox-core/tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def test_load_tool_success(aioresponses, test_tool_str):
9595
assert (
9696
loaded_tool.__doc__
9797
== test_tool_str.description
98-
+ f"\n\nArgs:\n param1 (string): Description of Param1"
98+
+ f"\n\nArgs:\n param1 (str): Description of Param1"
9999
)
100100

101101
# Assert signature inspection

0 commit comments

Comments
 (0)