PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: mgechev/revive (go)
Issue: empty-lines false positive as of 1.2.2
Single line functions are flagged as having an erroneous newline at the start and end as of revive 1.2.2.

main.go:
```go
package main

func main() { println("foo") }
```

config.toml:
```toml
[rule.empty-lines]
```

```
@m4x3r:~/foo
$ go install github.com/mgechev/revive@v1.2.1

[19:54:35]
@m4x3r:~/foo
$ revive -config config.toml ./...

[19:54:39]
@m4x3r:~/foo
$ go install github.com/mgechev/revive@v1.2.2

[19:54:41]
@m4x3r:~/foo
$ revive -config config.toml ./...
main.go:3:13: extra empty line at the start of a block
main.go:3:13: extra empty line at the end of a block

[19:54:43]
@m4x3r:~/foo
$ go install github.com/mgechev/revive@v1.2.3

[19:54:46]
@m4x3r:~/foo
$ revive -config config.toml ./...
main.go:3:13: extra empty line at the start of a block
main.go:3:13: extra empty line at the end of a block
```
Pull request description: fix bug #739: empty-lines false positive
Closes #739 


Patch:
diff --git a/rule/empty-lines.go b/rule/empty-lines.go
index 1286607..2710a89 100644
--- a/rule/empty-lines.go
+++ b/rule/empty-lines.go
@@ -51,7 +51,7 @@ func (w lintEmptyLines) checkStart(block *ast.BlockStmt) {
 	firstNode := block.List[0]
 	firstStmt := w.position(firstNode.Pos())
 
-	firstBlockLineIsStmt := firstStmt.Line-(blockStart.Line+1) == 0
+	firstBlockLineIsStmt := firstStmt.Line-(blockStart.Line+1) <= 0
 	_, firstBlockLineIsComment := w.cmap[blockStart.Line+1]
 	if firstBlockLineIsStmt || firstBlockLineIsComment {
 		return
@@ -70,7 +70,7 @@ func (w lintEmptyLines) checkEnd(block *ast.BlockStmt) {
 	lastNode := block.List[len(block.List)-1]
 	lastStmt := w.position(lastNode.End())
 
-	lastBlockLineIsStmt := (blockEnd.Line-1)-lastStmt.Line == 0
+	lastBlockLineIsStmt := (blockEnd.Line-1)-lastStmt.Line <= 0
 	_, lastBlockLineIsComment := w.cmap[blockEnd.Line-1]
 	if lastBlockLineIsStmt || lastBlockLineIsComment {
 		return


Test patch:
diff --git a/testdata/empty-lines.go b/testdata/empty-lines.go
index a37a778..916d69d 100644
--- a/testdata/empty-lines.go
+++ b/testdata/empty-lines.go
@@ -168,3 +168,6 @@ func ShouldNotWarn() {
 
 	// comment
 }
+
+// NR test for issue #739
+func NotWarnInSingleLineFunction() { println("foo") }
Repository: lesshint/lesshint (js)
Issue: spaceAroundOperator negation of variable
```
@someVar: 13px;

.test {
    margin-left: -@someVar;
}
```
> Warning: styles.less: line 4, col 20, spaceAroundOperator: Operators should be preceded and followed by one space.
Pull request description: spaceAroundOperator shouldn't report negative variables
Closes #179

Patch:
diff --git a/lib/linters/space_around_operator.js b/lib/linters/space_around_operator.js
index 5c848ce..cdd62d8 100644
--- a/lib/linters/space_around_operator.js
+++ b/lib/linters/space_around_operator.js
@@ -34,6 +34,12 @@ module.exports = {
                 return;
             }
 
+            // Ignore variables
+            if (child.value === '-' && (child.raws.before || node.raws.between) &&
+                nextElement.type === 'atword' && !nextElement.raws.before) {
+                return;
+            }
+
             // Ignore font-size/line-height shorthand declaration
             if (node.prop === 'font' && child.value === '/' &&
                 prevElement.type === 'number' && nextElement.type === 'number') {


Test patch:
diff --git a/test/specs/linters/space_around_operator.js b/test/specs/linters/space_around_operator.js
index c0cfdf2..ccf3784 100644
--- a/test/specs/linters/space_around_operator.js
+++ b/test/specs/linters/space_around_operator.js
@@ -114,6 +114,16 @@ describe('lesshint', function () {
                 });
             });
 
+            it('should not report on negative variables. See #179', function () {
+                var source = 'margin-left: -@foo;';
+
+                return spec.parse(source, function (ast) {
+                    var result = spec.linter.lint(options, ast.root.first);
+
+                    expect(result).to.be.undefined;
+                });
+            });
+
             it('should not report on font-size/line-height shorthand declaration', function () {
                 var source = 'font: 12px/1.5 Arial;';
Repository: PyCQA/pyflakes (python)
Issue: F811 incorrectly raised for type annotation of imported variable
The following piece of code raises F811 error in pyflakes 2.3.0:
```python
        from django.core.files.storage import default_storage
        default_storage: Storage
        file_path = os.path.join(constants.FILE_FIELD_UPLOAD_DIR_NAME, value.name)
        value = default_storage.save(file_path, value)
```

I am using pyflakes with flake8 and getting this output:
```
F811 redefinition of unused 'default_storage' from line 124
        default_storage: Storage
        ^
1     F811 redefinition of unused 'default_storage' from line 124
```

the code works correctly and `default_storage: Storage` does not redefine the variable, and `default_storage` is used two lines below.
Pull request description: Annotations no longer redefine names
Resolves #617

Patch:
diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index 01bcf50..48d3841 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -548,6 +548,10 @@ class Annotation(Binding):
     annotation.
     """
 
+    def redefines(self, other):
+        """An Annotation doesn't define any name, so it cannot redefine one."""
+        return False
+
 
 class FunctionDefinition(Definition):
     pass
diff --git a/tox.ini b/tox.ini
index 37f2b86..c88831a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,7 +8,7 @@ deps = flake8==3.6.0
 setenv = PYFLAKES_ERROR_UNKNOWN=1
 commands =
     python --version --version
-    python -m unittest discover pyflakes
+    python -m unittest discover pyflakes {posargs}
     flake8 pyflakes setup.py
 
 [flake8]


Test patch:
diff --git a/pyflakes/test/test_type_annotations.py b/pyflakes/test/test_type_annotations.py
index 9e7ca14..f131034 100644
--- a/pyflakes/test/test_type_annotations.py
+++ b/pyflakes/test/test_type_annotations.py
@@ -283,6 +283,14 @@ class TestTypeAnnotations(TestCase):
         a: 'a: "A"'
         ''', m.ForwardAnnotationSyntaxError)
 
+    @skipIf(version_info < (3, 6), 'new in Python 3.6')
+    def test_annotating_an_import(self):
+        self.flakes('''
+            from a import b, c
+            b: c
+            print(b)
+        ''')
+
     @skipIf(version_info < (3, 6), 'new in Python 3.6')
     def test_unused_annotation(self):
         # Unused annotations are fine in module and class scope