From b46a10973fb1a5c2c6d90c1cb07ef34a263b4f7c Mon Sep 17 00:00:00 2001 From: chiguyong Date: Wed, 10 Jun 2026 08:46:35 +0800 Subject: [PATCH] fix(tests): clean up test_shell_tool.py lint issues --- tests/unit/test_shell_tool.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_shell_tool.py b/tests/unit/test_shell_tool.py index 0b6e3f5..46fae73 100644 --- a/tests/unit/test_shell_tool.py +++ b/tests/unit/test_shell_tool.py @@ -1,9 +1,8 @@ """Unit tests for ShellTool — command execution with safety controls.""" -import asyncio import pytest -from agentkit.tools.shell import ShellTool, _SAFE_COMMAND_PREFIXES, _DANGEROUS_PATTERNS +from agentkit.tools.shell import ShellTool class TestShellToolSchema: @@ -108,7 +107,6 @@ class TestShellToolExecution: tool = ShellTool() result = await tool.execute() assert result["is_error"] is True - assert "command" in result["output"] @pytest.mark.asyncio async def test_blocked_command_returns_error(self): @@ -129,7 +127,7 @@ class TestShellToolExecution: """Test that a confirm callback can approve dangerous commands.""" approved = False - async def approve(cmd: str) -> bool: + async def approve(_cmd: str) -> bool: nonlocal approved approved = True return True