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: insert after target line instead of before it (#1416)
Taksh Kothari10e3e76e629a
diff --git a/tools/windowed_edit_replace/bin/insert b/tools/windowed_edit_replace/bin/insertindex 6b4cbe96..26641eb6 100644--- a/tools/windowed_edit_replace/bin/insert+++ b/tools/windowed_edit_replace/bin/insert@@ -46,7 +46,7 @@ def main(text: str, line: Union[int, None] = None):exit(1)pre_edit_lint = flake8(wf.path)- insert_info = wf.insert(text, line=line - 1 if line is not None else None)+ insert_info = wf.insert(text, line=line if line is not None else None)post_edit_lint = flake8(wf.path)# Try to filter out pre-existing errors