Skip to content

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]

Type annotations

Kilian Lieret3caa41d1023d
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index d60189ef..f33559c4 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -1038,7 +1038,7 @@ class Agent:
# Note: The trajectory/info will not include the last `submit` command
self._rloop.on_submit(ReviewSubmission(trajectory=self.trajectory, info=self.info))
# (make sure to save trajectory after self._rloop.on_submit)
- retry = self._rloop.retry()
+ retry: bool = self._rloop.retry()
self._forwarded_vars = self._rloop.get_forwarded_vars()
self.info["review"] = self._rloop.reviews[-1].to_dict()
# Call save_trajectory again to save the updated info with the final reviews
diff --git a/sweagent/agent/reviewer.py b/sweagent/agent/reviewer.py
index b86f3e99..4ccd20fa 100644
--- a/sweagent/agent/reviewer.py
+++ b/sweagent/agent/reviewer.py
@@ -28,7 +28,7 @@ class AbstractReviewer(ABC):
"""
@abstractmethod
- def review(self, instance: INSTANCE_TYPE, submission) -> ReviewerResult:
+ def review(self, instance: INSTANCE_TYPE, submission: ReviewSubmission) -> ReviewerResult:
"""Returns True if the submission is believed to be correct"""