Skip to content

Commit ee80bd5

Browse files
yanmxaclaude
andcommitted
fix: resolve lint issues
- Fix import sorting in multiple files - Remove duplicate ResponseComputerToolCall import - Organize imports according to ruff rules 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2a23cb7 commit ee80bd5

File tree

9 files changed

+22644
-10
lines changed

9 files changed

+22644
-10
lines changed

.vscode/PythonImportHelper-v2-Completion.json

Lines changed: 22635 additions & 0 deletions
Large diffs are not rendered by default.

examples/basic/agent_lifecycle_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pydantic import BaseModel
66

7-
from agents import Agent, AgentHooks, RunContextWrapper, Runner, Tool, Action, function_tool
7+
from agents import Action, Agent, AgentHooks, RunContextWrapper, Runner, Tool, function_tool
88

99

1010
class CustomAgentHooks(AgentHooks):

examples/basic/lifecycle_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pydantic import BaseModel
66

7-
from agents import Agent, RunContextWrapper, RunHooks, Runner, Tool, Usage, function_tool, Action
7+
from agents import Action, Agent, RunContextWrapper, RunHooks, Runner, Tool, Usage, function_tool
88

99

1010
class ExampleHooks(RunHooks):

src/agents/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
StreamEvent,
5959
)
6060
from .tool import (
61+
Action,
6162
CodeInterpreterTool,
6263
ComputerTool,
6364
FileSearchTool,
@@ -75,7 +76,6 @@
7576
WebSearchTool,
7677
default_tool_error_function,
7778
function_tool,
78-
Action,
7979
)
8080
from .tracing import (
8181
AgentSpanData,

src/agents/_run_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
LocalShellTool,
7979
MCPToolApprovalRequest,
8080
Tool,
81-
ToolRunFunction,
8281
ToolRunComputerAction,
82+
ToolRunFunction,
8383
)
8484
from .tool_context import ToolContext
8585
from .tracing import (

src/agents/lifecycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from .agent import Agent, AgentBase
66
from .run_context import RunContextWrapper, TContext
7-
from .tool import Tool, Action
7+
from .tool import Action, Tool
88

99
TAgent = TypeVar("TAgent", bound=AgentBase, default=AgentBase)
1010

src/agents/tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from dataclasses import dataclass
77
from typing import TYPE_CHECKING, Any, Callable, Literal, Union, overload
88

9+
from openai.types.responses import ResponseFunctionToolCall
910
from openai.types.responses.file_search_tool_param import Filters, RankingOptions
1011
from openai.types.responses.response_computer_tool_call import (
1112
PendingSafetyCheck,
@@ -16,7 +17,6 @@
1617
from openai.types.responses.web_search_tool_param import UserLocation
1718
from pydantic import ValidationError
1819
from typing_extensions import Concatenate, NotRequired, ParamSpec, TypedDict
19-
from openai.types.responses import ResponseComputerToolCall, ResponseFunctionToolCall
2020

2121
from . import _debug
2222
from .computer import AsyncComputer, Computer

tests/test_agent_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88
from typing_extensions import TypedDict
99

10-
from agents.agent import Agent, Action
10+
from agents.agent import Action, Agent
1111
from agents.lifecycle import AgentHooks
1212
from agents.run import Runner
1313
from agents.run_context import RunContextWrapper, TContext

tests/test_computer_action.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
)
2424

2525
from agents import (
26-
Agent,
2726
Action,
27+
Agent,
2828
AgentHooks,
2929
AsyncComputer,
3030
Computer,
@@ -34,9 +34,8 @@
3434
RunHooks,
3535
)
3636
from agents._run_impl import ComputerAction, RunImpl
37-
from agents.tool import ToolRunComputerAction
3837
from agents.items import ToolCallOutputItem
39-
from agents.tool import ComputerToolSafetyCheckData
38+
from agents.tool import ComputerToolSafetyCheckData, ToolRunComputerAction
4039

4140

4241
class LoggingComputer(Computer):

0 commit comments

Comments
 (0)