PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: python/bedevere (python)
Issue: Copy over topic-* labels to backport PRs
Working on the REPL recently and trying to organize work with a `topic-repl` label, I noticed that `topic-*` labels are not copied over to backport PRs. Would it make sense for bedevere to do that?
Pull request description: Copy over topic-* labels to backport PRs
Closes #640.

Patch:
diff --git a/bedevere/backport.py b/bedevere/backport.py
index 7786f75..6dede2d 100644
--- a/bedevere/backport.py
+++ b/bedevere/backport.py
@@ -31,7 +31,7 @@ BACKPORT_TITLE_DEVGUIDE_URL = (
 
 async def _copy_over_labels(gh, original_issue, backport_issue):
     """Copy over relevant labels from the original PR to the backport PR."""
-    label_prefixes = "skip", "type", "sprint"
+    label_prefixes = "skip", "type", "sprint", "topic"
     labels = list(
         filter(lambda x: x.startswith(label_prefixes), util.labels(original_issue))
     )


Test patch:
diff --git a/tests/test_backport.py b/tests/test_backport.py
index 85ad1bd..f0d4dce 100644
--- a/tests/test_backport.py
+++ b/tests/test_backport.py
@@ -276,7 +276,13 @@ async def test_label_copying(pr_prefix):
         },
     }
     event = sansio.Event(event_data, event="pull_request", delivery_id="1")
-    labels_to_test = "CLA signed", "skip news", "type-enhancement", "sprint"
+    labels_to_test = (
+        "CLA signed",
+        "skip news",
+        "type-enhancement",
+        "sprint",
+        "topic-repl",
+    )
     getitem_data = {
         "https://api.github.com/issue/1234": {
             "labels": [{"name": label} for label in labels_to_test],
@@ -293,7 +299,12 @@ async def test_label_copying(pr_prefix):
     expected_post = None
     for post in gh.post_:
         if post[0] == "https://api.github.com/issue/1234/labels":
-            assert {"skip news", "type-enhancement", "sprint"} == frozenset(post[1])
+            assert {
+                "skip news",
+                "type-enhancement",
+                "sprint",
+                "topic-repl",
+            } == frozenset(post[1])
             expected_post = post
 
     assert expected_post is not None
Repository: ManevilleF/hexx (rust)
Issue: Hex::line_to always returns the origin when start==end
Specialcasing this in my code fixed the bug I was seeing, so it's just a simple bad computation :)
Pull request description: Fixed empty line to
> Closes #43 

Fixes empty `line_to` implementation. With this fix the returned line will always contain at least both `start` and `end` coordinates.

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad164d4..984f6a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # CHANGELOG
 
+## Unreleased
+
+* Fixed `conversion` module was private (#42)
+* Fixed `Hex::line_to` returning `(0, 0)` when both ends are identical (#43)
+
 ## 0.4.1
 
 ### Fix
diff --git a/src/hex/mod.rs b/src/hex/mod.rs
index d424059..983d684 100644
--- a/src/hex/mod.rs
+++ b/src/hex/mod.rs
@@ -720,8 +720,9 @@ impl Hex {
     /// ````
     pub fn line_to(self, other: Self) -> impl Iterator<Item = Self> {
         let distance = self.distance_to(other);
+        let dist = distance.max(1) as f32;
         let [a, b]: [Vec2; 2] = [self.as_vec2(), other.as_vec2()];
-        (0..=distance).map(move |step| a.lerp(b, step as f32 / distance as f32).into())
+        (0..=distance).map(move |step| a.lerp(b, step as f32 / dist).into())
     }
 
     /// Performs a linear interpolation between `self` and `rhs` based on the value `s`.


Test patch:
diff --git a/src/hex/tests.rs b/src/hex/tests.rs
index 365d591..dfce358 100644
--- a/src/hex/tests.rs
+++ b/src/hex/tests.rs
@@ -337,6 +337,13 @@ fn line_to() {
     );
 }
 
+#[test]
+fn empty_line_to() {
+    let start = Hex::new(3, -7);
+    let line: Vec<_> = start.line_to(start).collect();
+    assert_eq!(line, vec![start]);
+}
+
 #[test]
 fn directions_to() {
     let a = Hex::new(0, 0);