Fix some ruff issues in code
This commit is contained in:
+4
-4
@@ -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] = {
|
||||
|
||||
Reference in New Issue
Block a user