SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Fix pydantic warnings about StepOutput data
Kilian Lieretbb6badf271cf
diff --git a/sweagent/types.py b/sweagent/types.pyindex c006cccd..3ac7f7dc 100644--- a/sweagent/types.py+++ b/sweagent/types.py@@ -22,10 +22,10 @@ class StepOutput(BaseModel):observation: str = ""execution_time: float = 0.0done: bool = False- exit_status: str | None = None+ exit_status: int | str | None = Nonesubmission: str | None = Nonestate: dict[str, str] = {}- tool_calls: list[dict[str, str]] | None = None+ tool_calls: list[dict[str, Any]] | None = Nonetool_call_ids: list[str] | None = None"""State of the environment at the end of the step"""diff --git a/tests/test_history_processors.py b/tests/test_history_processors.pyindex 20b0b514..2596e5af 100644--- a/tests/test_history_processors.py+++ b/tests/test_history_processors.py@@ -36,5 +36,5 @@ def test_add_tag_to_edits(test_history: History):processor = TagToolCallObservations(tags={"test"}, function_names={"edit"})new_history = processor(test_history)for entry in new_history:- if entry.get("action", "").startswith("edit "):+ if entry.get("action", "").startswith("edit "): # type: ignoreassert entry.get("tags") == ["test"], entry