Skip to content

Commit 38108ea

Browse files
Fix typos and update async for loop variable (#1122)
this PR fixes typos in docstrings and updates the async for loop variable in the test as per review feedback. fixed typo: ToolToFinalOutputResult -> ToolsToFinalOutputResult removed duplicate 'a' in docstring changed async for loop variable from _event to _ in test_session_exceptions.py
1 parent 14154b7 commit 38108ea

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/agents/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class Agent(AgentBase, Generic[TContext]):
210210
The final output will be the output of the first matching tool call. The LLM does not
211211
process the result of the tool call.
212212
- A function: If you pass a function, it will be called with the run context and the list of
213-
tool results. It must return a `ToolToFinalOutputResult`, which determines whether the tool
213+
tool results. It must return a `ToolsToFinalOutputResult`, which determines whether the tool
214214
calls result in a final output.
215215
216216
NOTE: This configuration is specific to FunctionTools. Hosted tools, such as file search,

src/agents/tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class MCPToolApprovalFunctionResult(TypedDict):
200200
@dataclass
201201
class HostedMCPTool:
202202
"""A tool that allows the LLM to use a remote MCP server. The LLM will automatically list and
203-
call tools, without requiring a a round trip back to your code.
203+
call tools, without requiring a round trip back to your code.
204204
If you want to run MCP servers locally via stdio, in a VPC or other non-publicly-accessible
205205
environment, or you just prefer to run tool calls locally, then you can instead use the servers
206206
in `agents.mcp` and pass `Agent(mcp_servers=[...])` to the agent."""

tests/test_session_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async def test_end_to_end_exception_propagation_and_cleanup(
123123
async with session:
124124
# Try to iterate and expect exception
125125
with pytest.raises(ValueError, match="Test error"):
126-
async for _event in session:
126+
async for _ in session:
127127
pass # Should never reach here
128128

129129
# Verify cleanup occurred

0 commit comments

Comments
 (0)