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]
Tool fix: Do not use Generator annotation
Kilian Lierete27262a8c748
diff --git a/tools/defaults/lib/default_utils.py b/tools/defaults/lib/default_utils.pyindex 364ef8d7..563f8f6c 100644--- a/tools/defaults/lib/default_utils.py+++ b/tools/defaults/lib/default_utils.py@@ -1,6 +1,5 @@import jsonimport os-from collections.abc import Generatorfrom dataclasses import dataclassfrom pathlib import Pathfrom typing import Any, Optional, Tuple, Union@@ -48,7 +47,7 @@ class TextNotFound(Exception):"""Raised when the text is not found in the window."""-def _find_all(a_str: str, sub: str) -> Generator[int, None, None]:+def _find_all(a_str: str, sub: str):start = 0while True:start = a_str.find(sub, start)