Fix some ruff issues in code

This commit is contained in:
2025-12-07 05:33:39 +01:00
parent 7c9598f632
commit 10704896f9
12 changed files with 27 additions and 28 deletions
+4 -4
View File
@@ -46,13 +46,13 @@ def _create_tool_from_function(func: Callable) -> Tool:
# Map Python types to JSON schema types
param_type = "string" # default
if param.annotation != inspect.Parameter.empty:
if param.annotation == str:
if param.annotation is str:
param_type = "string"
elif param.annotation == int:
elif param.annotation is int:
param_type = "integer"
elif param.annotation == float:
elif param.annotation is float:
param_type = "number"
elif param.annotation == bool:
elif param.annotation is bool:
param_type = "boolean"
properties[param_name] = {