fix(tests): clean up test_shell_tool.py lint issues
This commit is contained in:
parent
9646b0f0dd
commit
b46a10973f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue