Skip to content

Commit 197abec

Browse files
committed
fix: resolve linting issues
1 parent a81da67 commit 197abec

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/agents/function_schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class FuncSchema:
3636
strict_json_schema: bool = True
3737
"""Whether the JSON schema is in strict mode. We **strongly** recommend setting this to True,
3838
as it increases the likelihood of correct JSON input."""
39-
39+
4040
def to_call_args(self, data: BaseModel) -> tuple[list[Any], dict[str, Any]]:
4141
"""
4242
Converts validated data from the Pydantic model into (args, kwargs), suitable for calling

src/agents/tool.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ def function_tool(
189189
failure_error_function: If provided, use this function to generate an error message when
190190
the tool call fails. The error message is sent to the LLM. If you pass None, then no
191191
error message will be sent and instead an Exception will be raised.
192-
strict_mode: If False, parameters with default values become optional in the function schema.
192+
strict_mode: If False, parameters with default values become optional in the
193+
function schema.
193194
"""
194195

195196
def _create_function_tool(the_func: ToolFunction[...]) -> FunctionTool:

tests/test_function_tool_decorator.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def multiple_optional_params_function(x: int = 42, y: str = "hello", z: int | No
175175
async def test_multiple_optional_params_function():
176176
tool = multiple_optional_params_function
177177

178-
input_data = {}
178+
input_data: dict[str,Any] = {}
179179
output = await tool.on_invoke_tool(ctx_wrapper(), json.dumps(input_data))
180180
assert output == "42_hello_no_z"
181181

@@ -185,4 +185,4 @@ async def test_multiple_optional_params_function():
185185

186186
input_data = {"x": 10, "y": "world", "z": 99}
187187
output = await tool.on_invoke_tool(ctx_wrapper(), json.dumps(input_data))
188-
assert output == "10_world_99"
188+
assert output == "10_world_99"

0 commit comments

Comments
 (0)