nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: line/line-bot-sdk-python
Pull request #229 (2019-12-09 08:52:44)

Implement stickerResourceType property
implments #228

okue: Thanks for your PR.

Would you merge master into your branch? (I modified the pydocstring which causes the CI to fail)
clsung: > Thanks for your PR.
> 
> Would you merge master into your branch? (I modified the pydocstring which causes the CI to fail)

rebased, thanks for notification
okue: Would you please add an item `sticker_resource_type` to the following place?
https://github.com/line/line-bot-sdk-python/blame/b93d92954a66a77a057f3cc60098d1f6740998ee/README.rst#L1059-L1063
clsung: > Would you please add an item `sticker_resource_type` to the following place?
> https://github.com/line/line-bot-sdk-python/blame/b93d92954a66a77a057f3cc60098d1f6740998ee/README.rst#L1059-L1063

Added, thanks.

Patch:
diff --git a/README.rst b/README.rst
index f8189f9..a0c2786 100644
--- a/README.rst
+++ b/README.rst
@@ -1061,6 +1061,7 @@ Message
     - id
     - package\_id
     - sticker\_id
+    - sticker\_resource\_type
 - FileMessage
     - type
     - id
diff --git a/linebot/models/messages.py b/linebot/models/messages.py
index 9b719ad..5aca52f 100644
--- a/linebot/models/messages.py
+++ b/linebot/models/messages.py
@@ -176,12 +176,14 @@ class StickerMessage(Message):
     For a list of basic LINE stickers and sticker IDs, see sticker list.
     """
 
-    def __init__(self, id=None, package_id=None, sticker_id=None, **kwargs):
+    def __init__(self, id=None, package_id=None, sticker_id=None,
+                 sticker_resource_type=None, **kwargs):
         """__init__ method.
 
         :param str id: Message ID
         :param str package_id: Package ID
         :param str sticker_id: Sticker ID
+        :param str sticker_resource_type: Sticker resource type
         :param kwargs:
         """
         super(StickerMessage, self).__init__(id=id, **kwargs)
@@ -189,6 +191,7 @@ class StickerMessage(Message):
         self.type = 'sticker'
         self.package_id = package_id
         self.sticker_id = sticker_id
+        self.sticker_resource_type = sticker_resource_type
 
 
 class FileMessage(Message):


Test patch:
diff --git a/tests/test_webhook.py b/tests/test_webhook.py
index 0a4fa0e..edf2c98 100644
--- a/tests/test_webhook.py
+++ b/tests/test_webhook.py
@@ -156,6 +156,7 @@ class TestWebhookParser(unittest.TestCase):
         self.assertEqual(events[5].message.type, 'sticker')
         self.assertEqual(events[5].message.package_id, '1')
         self.assertEqual(events[5].message.sticker_id, '1')
+        self.assertEqual(events[5].message.sticker_resource_type, 'STATIC')
 
         # FollowEvent, SourceUser
         self.assertIsInstance(events[6], FollowEvent)
diff --git a/tests/text/webhook.json b/tests/text/webhook.json
index 5899f8a..72a8d05 100644
--- a/tests/text/webhook.json
+++ b/tests/text/webhook.json
@@ -99,7 +99,8 @@
         "id": "325708",
         "type": "sticker",
         "packageId": "1",
-        "stickerId": "1"
+        "stickerId": "1",
+        "stickerResourceType": "STATIC"
       }
     },
     {
Repository: getmoto/moto
Pull request #7622 (2024-04-22 23:25:40)

Refactor: Remove the Elasticache default cluster configuration
# Purpose

Due to an oversight, a default cache cluster is being created during the initialization phase of the Elasticache model. The default cluster is being created under the `cache_cluster` dictionary.

# Changes

- Removed the default `cache_cluster` creation step
- Update the `test_describe_all_cache_clusters` Elasticache test to exclude the action to delete the default `cache_cluster`

#7591 


Patch:
diff --git a/moto/elasticache/models.py b/moto/elasticache/models.py
index 7b90c9eca..8f470006a 100644
--- a/moto/elasticache/models.py
+++ b/moto/elasticache/models.py
@@ -152,44 +152,7 @@ class ElastiCacheBackend(BaseBackend):
             no_password_required=True,
         )
 
-        # Define the cache_clusters dictionary to detect duplicates
-        self.cache_clusters = dict()
-        self.cache_clusters["default"] = CacheCluster(
-            account_id=self.account_id,
-            region_name=self.region_name,
-            cache_cluster_id="default",
-            replication_group_id=None,
-            az_mode=None,
-            preferred_availability_zone=None,
-            num_cache_nodes=1,
-            cache_node_type=None,
-            engine="redis",
-            engine_version=None,
-            cache_parameter_group_name=None,
-            cache_subnet_group_name=None,
-            transit_encryption_enabled=True,
-            network_type=None,
-            ip_discovery=None,
-            snapshot_name=None,
-            preferred_maintenance_window=None,
-            port=6379,
-            notification_topic_arn=None,
-            auto_minor_version_upgrade=True,
-            snapshot_retention_limit=0,
-            snapshot_window=None,
-            auth_token=None,
-            outpost_mode=None,
-            preferred_outpost_arn=None,
-            preferred_availability_zones=[],
-            cache_security_group_names=[],
-            security_group_ids=[],
-            tags=[],
-            snapshot_arns=[],
-            preferred_outpost_arns=[],
-            log_delivery_configurations=[],
-            cache_node_ids_to_remove=[],
-            cache_node_ids_to_reboot=[],
-        )
+        self.cache_clusters: Dict[str, Any] = dict()
 
     def create_user(
         self,


Test patch:
diff --git a/tests/test_elasticache/test_elasticache.py b/tests/test_elasticache/test_elasticache.py
index 29671f033..d7b47934b 100644
--- a/tests/test_elasticache/test_elasticache.py
+++ b/tests/test_elasticache/test_elasticache.py
@@ -305,8 +305,6 @@ def test_describe_all_cache_clusters():
     assert resp["ResponseMetadata"]["HTTPStatusCode"] == 200
 
     cache_clusters = resp["CacheClusters"]
-    # account for the default cluster created moto/elasticache/models.py line 148
-    del cache_clusters[0]
 
     for i, cache_cluster in enumerate(cache_clusters):
         if cache_cluster["CacheClusterId"] == f"test-cache-cluster-{i}":
Repository: bytecodealliance/wasmtime
Pull request #8854 (2024-06-20 22:04:11)

clif: Fix parsing the `cold` calling convention
The identifier for the `cold` calling convention overlaps with the `cold` keyword for basic blocks so handle another kind of token when parsing signatures.

<!--
Please make sure you include the following information:

- If this work has been discussed elsewhere, please include a link to that
  conversation. If it was discussed in an issue, just mention "issue #...".

- Explain why this change is needed. If the details are in an issue already,
  this can be brief.

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->



Patch:
diff --git a/cranelift/reader/src/parser.rs b/cranelift/reader/src/parser.rs
index 9cf9116ff..6068af8de 100644
--- a/cranelift/reader/src/parser.rs
+++ b/cranelift/reader/src/parser.rs
@@ -1347,14 +1347,20 @@ impl<'a> Parser<'a> {
         }
 
         // The calling convention is optional.
-        if let Some(Token::Identifier(text)) = self.token() {
-            match text.parse() {
+        match self.token() {
+            Some(Token::Identifier(text)) => match text.parse() {
                 Ok(cc) => {
                     self.consume();
                     sig.call_conv = cc;
                 }
                 _ => return err!(self.loc, "unknown calling convention: {}", text),
+            },
+
+            Some(Token::Cold) => {
+                self.consume();
+                sig.call_conv = CallConv::Cold;
             }
+            _ => {}
         }
 
         Ok(sig)


Test patch:
diff --git a/cranelift/filetests/filetests/parser/cold.clif b/cranelift/filetests/filetests/parser/cold.clif
new file mode 100644
index 000000000..55064fe6a
--- /dev/null
+++ b/cranelift/filetests/filetests/parser/cold.clif
@@ -0,0 +1,12 @@
+test cat
+
+function %cold() cold {
+    sig0 = () cold
+    sig1 = () -> i8 cold
+block1:
+    return
+}
+
+; sameln: function %cold() cold {
+; nextln:     sig0 = () cold
+; nextln:     sig1 = () -> i8 cold
Repository: bytecodealliance/wasmtime
Pull request #9094 (2024-08-09 06:23:33)

Pass `--all-targets` to `cargo clippy` in CI
Checks all targets, including tests/benchmarks, in addition to main binaries/libraries.

<!--
Please make sure you include the following information:

- If this work has been discussed elsewhere, please include a link to that
  conversation. If it was discussed in an issue, just mention "issue #...".

- Explain why this change is needed. If the details are in an issue already,
  this can be brief.

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->



Patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ada3daffb..6cb1cb03b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -458,7 +458,7 @@ jobs:
 
     # Run clippy configuration
     - run: rustup component add clippy
-    - run: cargo clippy --workspace
+    - run: cargo clippy --workspace --all-targets
 
     # Re-vendor all WIT files and ensure that they're all up-to-date by ensuring
     # that there's no git changes.
diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
index d8f4ceaf9..63872692b 100644
--- a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
+++ b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
@@ -166,7 +166,7 @@ unsafe fn handler_thread() {
             break;
         }
         if kret != KERN_SUCCESS {
-            eprintln!("mach_msg failed with {} ({0:x})", kret);
+            eprintln!("mach_msg failed with {kret} ({kret:x})");
             libc::abort();
         }
         if request.body.Head.msgh_id != EXCEPTION_MSG_ID {


Test patch:
diff --git a/tests/disas.rs b/tests/disas.rs
index fa38dbb0f..1a07e8d69 100644
--- a/tests/disas.rs
+++ b/tests/disas.rs
@@ -409,14 +409,8 @@ fn assert_or_bless_output(path: &Path, wat: &str, actual: &str) -> Result<()> {
     let mut expected_lines: Vec<_> = wat
         .lines()
         .rev()
-        .take_while(|l| l.starts_with(";;"))
-        .map(|l| {
-            if l.starts_with(";; ") {
-                &l[3..]
-            } else {
-                &l[2..]
-            }
-        })
+        .map_while(|l| l.strip_prefix(";;"))
+        .map(|l| l.strip_prefix(" ").unwrap_or(l))
         .collect();
     expected_lines.reverse();
     let expected = expected_lines.join("\n");