PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: gcanti/fp-ts (ts)
Issue: Array map is unsafe (Regression)
We've switched back to standard Js array map function.
I've seen some code breaking due to that change.

Here's a repro:

```typescript
describe('array map is unsafe', () => {
  it('is as unsafe as native array map function', () => {
    interface Foo {
      bar: () => number
    }
    const f = (a: number, x?: Foo) => (x ? `${a}${x.bar()}` : `${a}`)
    const res = array.array.map([1, 2], f) // ERROR: TypeError: x.bar is not a function
    assert.deepEqual(res, ['1', '2'])
  })
})
```
I think `fp-ts` should be safe by default.
In the current state I cannot upgrade and have no means to detect the regressions.

@gcanti do you agree?

Pull request description: Bug Fix: array.map should be safe when executed with a binary functio…
…n, fix #675


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2331a224..f2feece9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,11 @@
 **Note**: Gaps between patch versions are faulty/broken releases. **Note**: A feature tagged as Experimental is in a
 high state of flux, you're at risk of it changing without notice.
 
+# 1.12.1
+
+- **Bug Fix**
+  - `array.map` should be safe when executed with a binary function, fix #675 (@gcanti)
+
 # 1.12.0
 
 - **Deprecation**
diff --git a/package.json b/package.json
index c064e1d1..3beea79c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "fp-ts",
-  "version": "1.12.0",
+  "version": "1.12.1",
   "description": "Functional programming in TypeScript",
   "files": [
     "lib"
diff --git a/src/Array.ts b/src/Array.ts
index 056e4950..50c89ccb 100644
--- a/src/Array.ts
+++ b/src/Array.ts
@@ -115,7 +115,7 @@ export const getOrd = <A>(O: Ord<A>): Ord<Array<A>> => {
 }
 
 const map = <A, B>(fa: Array<A>, f: (a: A) => B): Array<B> => {
-  return fa.map(f)
+  return fa.map(a => f(a))
 }
 
 const mapWithIndex = <A, B>(fa: Array<A>, f: (index: number, a: A) => B): Array<B> => {


Test patch:
diff --git a/test/Array.ts b/test/Array.ts
index 8c2d0fdd..ff50a717 100644
--- a/test/Array.ts
+++ b/test/Array.ts
@@ -717,4 +717,13 @@ describe('Array', () => {
     assert.deepEqual(difference(setoidNumber)([1, 2], [2, 3]), [1])
     assert.deepEqual(difference(setoidNumber)([1, 2], [1, 2]), [])
   })
+
+  it('should be safe when calling map with a binary function', () => {
+    interface Foo {
+      bar: () => number
+    }
+    const f = (a: number, x?: Foo) => (x !== undefined ? `${a}${x.bar()}` : `${a}`)
+    const res = array.map([1, 2], f)
+    assert.deepEqual(res, ['1', '2'])
+  })
 })
Repository: rwjblue/ember-template-lint (js)
Issue: invalid-interactive additionalInteractiveTags not working?
I have this:

```<form {{action 'foo' on="submit"}}>```

and its failing the invalid-interactive check.  We don't have buttons in the form, but we want to be able to submit the form with the enter key for accessibility.  It seems like it should be okay for forms to submit actions...

I still think its odd to default forms to fail this check.  I'm trying to change this behavior with this rule and it doesn't seem to be working:

        'invalid-interactive': {additionalInteractiveTags:['form']},

when looking at 'lint-invalid-interactive.js' it doesn't appear to be using additionalInteractiveTags like 'lint-nested-interactive.js' is...
Pull request description: [BUGFIX] Honor `additionalInteractiveTags` option in `invalid-interactive` rule
Closes #101

Patch:
diff --git a/lib/rules/lint-invalid-interactive.js b/lib/rules/lint-invalid-interactive.js
index b9b385b..847060d 100644
--- a/lib/rules/lint-invalid-interactive.js
+++ b/lib/rules/lint-invalid-interactive.js
@@ -11,12 +11,23 @@ module.exports = function(addonContext) {
     return parseConfig(this.ruleName, config);
   };
 
+  InvalidInteractive.prototype.isCustomInteractiveElement = function(node) {
+    var additionalInteractiveTags = this.config.additionalInteractiveTags || [];
+
+    if (additionalInteractiveTags.indexOf(node.tag) > -1) {
+      return true;
+    } else {
+      return false;
+    }
+  };
+
   InvalidInteractive.prototype.visitors = function() {
     this._element = null;
 
     var visitor = {
       enter: function(node) {
-        this._element = !isInteractiveElement(node) ? node : null;
+        var isInteractive = isInteractiveElement(node) || this.isCustomInteractiveElement(node);
+        this._element = !isInteractive ? node : null;
       },
 
       exit: function(node) {


Test patch:
diff --git a/test/unit/rules/lint-invalid-interactive-test.js b/test/unit/rules/lint-invalid-interactive-test.js
index 1361363..0074553 100644
--- a/test/unit/rules/lint-invalid-interactive-test.js
+++ b/test/unit/rules/lint-invalid-interactive-test.js
@@ -10,7 +10,15 @@ generateRuleTests({
   good: [
     '<button {{action "foo"}}></button>',
     '<div role="button" {{action "foo"}}></div>',
-    '<li><button {{action "foo"}}></button></li>'
+    '<li><button {{action "foo"}}></button></li>',
+    {
+      config: { additionalInteractiveTags: ['div'] },
+      template: '<div {{action "foo"}}></div>'
+    },
+    {
+      config: { additionalInteractiveTags: ['div'] },
+      template: '<div onclick={{action "foo"}}></div>'
+    }
   ],
 
   bad: [
Repository: adamchainz/flake8-comprehensions (python)
Issue: C416 false positive with sequences as comprehension elements
The example below produces a C416 ("Unnecessary list comprehension - rewrite using list()"):
```py
input = [
    (1, 1),
    (1, 1),
    (1, 1),
]
output = [(x, y, 1) for x, y in input]
```
I suspect it is because both an input and output element is a tuple. I don't think it should happen since the shapes of the tuples differ.

It feels rather tricky to analyze the shape, so maybe in this case the check should be disabled.
Pull request description: Fix false positives in C416 for list comprehensions returning tuples
Fixes #198.

Patch:
diff --git a/HISTORY.rst b/HISTORY.rst
index 93287ab..3d066a2 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -2,6 +2,12 @@
 History
 =======
 
+Pending
+-------
+
+* Fix false positives in ``C416`` rule for list comprehensions returning
+  tuples.
+
 3.1.1 (2019-11-16)
 ------------------
 
diff --git a/src/flake8_comprehensions.py b/src/flake8_comprehensions.py
index 5ca4e80..e1ea322 100644
--- a/src/flake8_comprehensions.py
+++ b/src/flake8_comprehensions.py
@@ -296,6 +296,10 @@ class ComprehensionChecker:
                         or (
                             isinstance(node.elt, ast.Tuple)
                             and isinstance(node.generators[0].target, ast.Tuple)
+                            and (
+                                len(node.elt.elts)
+                                == len(node.generators[0].target.elts)
+                            )
                             and all(
                                 isinstance(a, ast.Name)
                                 and isinstance(b, ast.Name)
@@ -329,6 +333,7 @@ if sys.version_info >= (3, 7):
     def is_async_generator(node):
         return node.is_async
 
+
 else:
 
     def is_async_generator(node):


Test patch:
diff --git a/tests/test_flake8_comprehensions.py b/tests/test_flake8_comprehensions.py
index 60c4e18..c52109b 100644
--- a/tests/test_flake8_comprehensions.py
+++ b/tests/test_flake8_comprehensions.py
@@ -942,12 +942,18 @@ def test_C416_pass_2_async_list(flake8dir):
 
 
 @python_3_7_plus
-def test_C416_pass_2_async_set(flake8dir):
+def test_C416_pass_3_async_set(flake8dir):
     flake8dir.make_example_py("{x async for x in range(5)}")
     result = flake8dir.run_flake8()
     assert result.out_lines == []
 
 
+def test_C416_pass_4_tuples(flake8dir):
+    flake8dir.make_example_py("[(x, y, 1) for x, y in []]")
+    result = flake8dir.run_flake8()
+    assert result.out_lines == []
+
+
 def test_C416_fail_1(flake8dir):
     flake8dir.make_example_py(
         """