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]
Tools fix: Newlines in line-no-based editing
Kilian Lieret1053720cdd1f
diff --git a/tools/edit_linting/bin/edit b/tools/edit_linting/bin/editindex ed95375d..854ee440 100644--- a/tools/edit_linting/bin/edit+++ b/tools/edit_linting/bin/edit@@ -69,8 +69,9 @@ def main(line_range: str, replacement_text: Union[str, None] = None):# Parse line rangestart_line, end_line = parse_line_range(line_range)- # Read replacement text from stdin if not provided as argumentif replacement_text is None:+ # Read replacement text from stdin (e.g., when sent via bash heredoc)+ # if not provided as argumentreplacement_lines = []while True:try:@@ -81,7 +82,7 @@ def main(line_range: str, replacement_text: Union[str, None] = None):except EOFError:breakreplacement_text = "\n".join(replacement_lines)- if replacement_text == "":+ elif replacement_text == "":# basically delete the linespasselse: