Fix some ruff issues in code
This commit is contained in:
@@ -99,7 +99,7 @@ class TestExecuteToolCall:
|
||||
"arguments": '{"folder_name": 123}', # Wrong type
|
||||
},
|
||||
}
|
||||
result = agent._execute_tool_call(tool_call)
|
||||
agent._execute_tool_call(tool_call)
|
||||
|
||||
mem = get_memory()
|
||||
assert len(mem.episodic.recent_errors) > 0
|
||||
@@ -187,7 +187,7 @@ class TestStep:
|
||||
mock_llm.complete = Mock(side_effect=mock_complete)
|
||||
agent = Agent(llm=mock_llm, max_tool_iterations=3)
|
||||
|
||||
response = agent.step("Do something")
|
||||
agent.step("Do something")
|
||||
|
||||
assert call_count[0] == 4
|
||||
|
||||
@@ -278,6 +278,6 @@ class TestAgentIntegration:
|
||||
mock_llm.complete = Mock(side_effect=mock_complete)
|
||||
agent = Agent(llm=mock_llm)
|
||||
|
||||
response = agent.step("List my downloads and movies")
|
||||
agent.step("List my downloads and movies")
|
||||
|
||||
assert call_count[0] == 3
|
||||
|
||||
@@ -164,7 +164,7 @@ class TestStepEdgeCases:
|
||||
mock_llm.complete = Mock(side_effect=mock_complete)
|
||||
agent = Agent(llm=mock_llm, max_tool_iterations=3)
|
||||
|
||||
response = agent.step("Loop test")
|
||||
agent.step("Loop test")
|
||||
|
||||
assert call_count[0] == 4
|
||||
|
||||
@@ -191,7 +191,7 @@ class TestStepEdgeCases:
|
||||
)
|
||||
agent = Agent(llm=mock_llm)
|
||||
|
||||
response = agent.step("Hello")
|
||||
agent.step("Hello")
|
||||
|
||||
call_args = mock_llm.complete.call_args[0][0]
|
||||
system_prompt = call_args[0]["content"]
|
||||
@@ -208,7 +208,7 @@ class TestStepEdgeCases:
|
||||
)
|
||||
agent = Agent(llm=mock_llm)
|
||||
|
||||
response = agent.step("Hello")
|
||||
agent.step("Hello")
|
||||
|
||||
call_args = mock_llm.complete.call_args[0][0]
|
||||
system_prompt = call_args[0]["content"]
|
||||
@@ -268,7 +268,7 @@ class TestAgentConcurrencyEdgeCases:
|
||||
mock_llm.complete = Mock(side_effect=mock_complete)
|
||||
agent = Agent(llm=mock_llm)
|
||||
|
||||
response = agent.step("Set movie folder")
|
||||
agent.step("Set movie folder")
|
||||
|
||||
mem = get_memory()
|
||||
assert mem.ltm.get_config("movie_folder") == str(real_folder["movies"])
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""Critical tests for configuration validation."""
|
||||
|
||||
|
||||
import pytest
|
||||
|
||||
from agent.config import ConfigurationError, Settings
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""Critical tests for prompt builder - Tests that would have caught bugs."""
|
||||
|
||||
|
||||
from agent.prompts import PromptBuilder
|
||||
from agent.registry import make_tools
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""Edge case tests for PromptBuilder."""
|
||||
|
||||
|
||||
from agent.prompts import PromptBuilder
|
||||
from agent.registry import make_tools
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""Edge case tests for tool registry."""
|
||||
|
||||
|
||||
import pytest
|
||||
|
||||
from agent.registry import Tool, make_tools
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""Tests for JSON repositories."""
|
||||
|
||||
|
||||
from domain.movies.entities import Movie
|
||||
from domain.movies.value_objects import MovieTitle, Quality, ReleaseYear
|
||||
from domain.shared.value_objects import FilePath, FileSize, ImdbId
|
||||
|
||||
Reference in New Issue
Block a user