PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: timothycrosley/isort (python)

Issue:
"multi_line_output = 6" generates invalid syntax
With "multi_line_output = 6" isort generates something like: 

    from a import x y z

which is not a valid import and will raise a SyntaxError. The commas are missing. With that it should be:

    from a import x, y, z

After reading the docs:
https://docs.python.org/2/reference/simple_stmts.html#import
https://docs.python.org/3/reference/simple_stmts.html#import
the comma is mandatory in all cases if there are more than one identifiers after import.

The version I use is 4.2.2 with python 2.7.

Pull request:
Fix invalid syntax for noqa output
Will fix #389 

Patch:
diff --git a/isort/isort.py b/isort/isort.py
index cc956eb1..90dcd72f 100644
--- a/isort/isort.py
+++ b/isort/isort.py
@@ -605,7 +605,7 @@ class SortImports(object):
         return self._output_vertical_grid_common(statement, imports, white_space, indent, line_length, comments) + "\n)"
 
     def _output_noqa(self, statement, imports, white_space, indent, line_length, comments):
-        retval = '{0}{1}'.format(statement, ' '.join(imports))
+        retval = '{0}{1}'.format(statement, ', '.join(imports))
         comment_str = ' '.join(comments)
         if comments:
             if len(retval) + 4 + len(comment_str) <= line_length:


Test patch:
diff --git a/test_isort.py b/test_isort.py
index 06c06ca3..878680ad 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -347,7 +347,7 @@ def test_output_modes():
 
     output_noqa = SortImports(file_contents=REALLY_LONG_IMPORT_WITH_COMMENT,
                               multi_line_output=WrapModes.NOQA).output
-    assert output_noqa == "from third_party import lib1 lib2 lib3 lib4 lib5 lib6 lib7 lib8 lib9 lib10 lib11 lib12 lib13 lib14 lib15 lib16 lib17 lib18 lib20 lib21 lib22  # NOQA comment\n"  # NOQA
+    assert output_noqa == "from third_party import lib1, lib2, lib3, lib4, lib5, lib6, lib7, lib8, lib9, lib10, lib11, lib12, lib13, lib14, lib15, lib16, lib17, lib18, lib20, lib21, lib22  # NOQA comment\n"  # NOQA
 
 
 def test_qa_comment_case():
Repository: jlongster/prettier (js)

Issue:
Ternary formatting with `await` changes behavior
```
(async function() {
  console.log(
    await (true ? Promise.resolve('A') : Promise.resolve('B'))
  );
})()
```

The expectation in this code is that the ternary will evaluate to a Promise, which is then awaited. Prettier removes the paren, though, so instead of awaiting a valid Promise it awaits `true`.

The output should be `"A"`, but instead its `Promise {}`

https://jlongster.github.io/prettier/#%7B%22content%22%3A%22(async%20function()%20%7B%5Cn%20%20console.log(%5Cn%20%20%20%20await%20(true%20%3F%20Promise.resolve('A')%20%3A%20Promise.resolve('B'))%5Cn%20%20)%3B%5Cn%7D)()%5Cn%22%2C%22options%22%3A%7B%22printWidth%22%3A80%2C%22tabWidth%22%3A2%2C%22singleQuote%22%3Afalse%2C%22trailingComma%22%3Afalse%2C%22bracketSpacing%22%3Atrue%2C%22jsxBracketSameLine%22%3Afalse%2C%22doc%22%3Afalse%7D%7D

Pull request:
Fix await ternary parenthesis
This should fix #739.

Patch:
diff --git a/src/fast-path.js b/src/fast-path.js
index 84afe6be3..ef6164a30 100644
--- a/src/fast-path.js
+++ b/src/fast-path.js
@@ -419,6 +419,7 @@ FPp.needsParens = function(assumeExpressionContext) {
         case "LogicalExpression":
         case "NewExpression":
         case "ExportDefaultDeclaration":
+        case "AwaitExpression":
           return true;
 
         case "CallExpression":


Test patch:
diff --git a/tests/async/__snapshots__/jsfmt.spec.js.snap b/tests/async/__snapshots__/jsfmt.spec.js.snap
index 208c7fca7..4496f3b53 100644
--- a/tests/async/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/async/__snapshots__/jsfmt.spec.js.snap
@@ -18,9 +18,19 @@ exports[`test conditional-expression.js 1`] = `
 "async function f() {
   const result = typeof fn === \'function\' ? await fn() : null;
 }
+
+(async function() {
+  console.log(
+    await (true ? Promise.resolve(\"A\") : Promise.resolve(\"B\"))
+  );
+})()
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 async function f() {
   const result = typeof fn === \"function\" ? await fn() : null;
 }
+
+(async function() {
+  console.log(await (true ? Promise.resolve(\"A\") : Promise.resolve(\"B\")));
+})();
 "
 `;
diff --git a/tests/async/conditional-expression.js b/tests/async/conditional-expression.js
index 532c66d6a..73d846394 100644
--- a/tests/async/conditional-expression.js
+++ b/tests/async/conditional-expression.js
@@ -1,3 +1,9 @@
 async function f() {
   const result = typeof fn === 'function' ? await fn() : null;
 }
+
+(async function() {
+  console.log(
+    await (true ? Promise.resolve("A") : Promise.resolve("B"))
+  );
+})()