PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: zalando/patroni (python)
Issue:  minor typo in logging message
`promoted self to leader because i had the session lock` instead of `promoted self to leader because I had the session lock` (note the capitalization of `I`) in `patroni/patroni/ha.py` and `patroni/tests/test_ha.py`.
Pull request description: fix minor typo
fixes #1990

Patch:
diff --git a/patroni/ha.py b/patroni/ha.py
index 7d08dcae..ee1c78e8 100644
--- a/patroni/ha.py
+++ b/patroni/ha.py
@@ -1002,7 +1002,7 @@ class Ha(object):
                 else:
                     return self.enforce_master_role(
                         'no action. I am ({0}) the leader with the lock'.format(self.state_handler.name),
-                        'promoted self to leader because i had the session lock'
+                        'promoted self to leader because I had the session lock'
                     )
             else:
                 # Either there is no connection to DCS or someone else acquired the lock


Test patch:
diff --git a/tests/test_ha.py b/tests/test_ha.py
index 85f1cfc8..68a9a4ea 100644
--- a/tests/test_ha.py
+++ b/tests/test_ha.py
@@ -300,7 +300,7 @@ class TestHa(PostgresInit):
         self.p.is_healthy = true
         self.ha.has_lock = true
         self.p.controldata = lambda: {'Database cluster state': 'in production', 'Database system identifier': SYSID}
-        self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because i had the session lock')
+        self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because I had the session lock')
 
     @patch('psycopg2.connect', psycopg2_connect)
     def test_acquire_lock_as_master(self):
@@ -354,7 +354,7 @@ class TestHa(PostgresInit):
         self.ha.cluster.is_unlocked = false
         self.ha.has_lock = true
         self.p.is_leader = false
-        self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because i had the session lock')
+        self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because I had the session lock')
 
     def test_promote_without_watchdog(self):
         self.ha.cluster.is_unlocked = false
Repository: rrrene/credo (elixir)
Issue: alias __MODULE__, as: Foo crashes AliasAs check
(PR with fix incoming)

### What were you trying to do?

Enable `AliasAs` check on a project that had `alias __MODULE__, as: Foo`

### Expected outcome

Successfully warns about use of alias as

### Actual outcome

Credo crashes without indication as to why
Pull request description: Fix crash in AliasAs check when __MODULE__ is aliased. Fixes #710.
Fix crash in AliasAs check when `__MODULE__` is aliased. Fixes #710.

Patch:
diff --git a/lib/credo/check/readability/alias_as.ex b/lib/credo/check/readability/alias_as.ex
index 6d8cfca0..bad2f74c 100644
--- a/lib/credo/check/readability/alias_as.ex
+++ b/lib/credo/check/readability/alias_as.ex
@@ -34,6 +34,9 @@ defmodule Credo.Check.Readability.AliasAs do
   defp add_issue(issues, nil), do: issues
   defp add_issue(issues, issue), do: [issue | issues]
 
+  defp issue({:alias, _, [{:__MODULE__, _, nil}, [as: {_, meta, _}]]}, issue_meta),
+    do: issue_for(issue_meta, meta[:line], inspect(:__MODULE__))
+
   defp issue({:alias, _, [{_, _, original}, [as: {_, meta, _}]]}, issue_meta),
     do: issue_for(issue_meta, meta[:line], inspect(Module.concat(original)))
 


Test patch:
diff --git a/test/credo/check/readability/alias_as_test.exs b/test/credo/check/readability/alias_as_test.exs
index 43466ec9..c829e17c 100644
--- a/test/credo/check/readability/alias_as_test.exs
+++ b/test/credo/check/readability/alias_as_test.exs
@@ -44,4 +44,15 @@ defmodule Credo.Check.Readability.AliasAsTest do
     assert issue2.trigger == "App.Module3"
     assert issue3.trigger == "App.Module4"
   end
+
+  test "it should not raise on alias __MODULE__, as: Foo" do
+    _ =
+      """
+      defmodule Test do
+        alias __MODULE__, as: Foo
+      end
+      """
+      |> to_source_file
+      |> assert_issue(@described_check)
+  end
 end
Repository: sveltejs/prettier-plugin-svelte (ts)
Issue: Empty style and script tags are expanded into three lines
I'm using Svelte with svelte-preprocessor. The following lines:

```html
<script src="./index.ts"></script>

<style src="./index.css"></style>
```

is formatted as:

```html
<script src="./index.ts">

</script>

<style src="./index.css">

</style>
```

My expected output should be the same as first one. Is this some kind of bug?

Thanks!
Pull request description: Make it possible to have script/style without newline
If the content of a script/style tag is completely empty (no whitespace), don't add a hardline anymore.
Fixes #87

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 06c8837..45d0d2f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
 * Everything that is not explicitely a block element is now treated as an inline element, including components. This is a breaking change ([#159](https://github.com/sveltejs/prettier-plugin-svelte/issues/159))
 * Single quotes are no longer forced except inside quoted attributes/events/etc. This is a breaking change ([#94](https://github.com/sveltejs/prettier-plugin-svelte/issues/94))
 * If the content inside a mustache tag is too long, break it up if possible. Only exception are Svelte Blocks (#if/#await/etc). This is a breaking change ([#170](https://github.com/sveltejs/prettier-plugin-svelte/issues/170))
+* If the content of a script/style tag is completely empty (no whitespace), don't add a hardline anymore. ([#87](https://github.com/sveltejs/prettier-plugin-svelte/issues/87))
 
 ## 1.4.2
 
diff --git a/src/embed.ts b/src/embed.ts
index 995a534..8e71454 100644
--- a/src/embed.ts
+++ b/src/embed.ts
@@ -184,6 +184,8 @@ function embedTag(
         isNodeSupportedLanguage(node) && !isIgnoreDirective(previousComment)
             ? content.trim() !== ''
                 ? formatBodyContent(content)
+                : content === ''
+                ? ''
                 : hardline
             : preformattedBody(content);
 


Test patch:
diff --git a/test/formatting/samples/scripts-styles-empty-handling/input.html b/test/formatting/samples/scripts-styles-empty-handling/input.html
new file mode 100644
index 0000000..63f96ea
--- /dev/null
+++ b/test/formatting/samples/scripts-styles-empty-handling/input.html
@@ -0,0 +1,7 @@
+<script context="module"></script>
+
+<script> </script>
+
+<style>
+
+</style>
diff --git a/test/formatting/samples/scripts-styles-empty-handling/output.html b/test/formatting/samples/scripts-styles-empty-handling/output.html
new file mode 100644
index 0000000..278ae83
--- /dev/null
+++ b/test/formatting/samples/scripts-styles-empty-handling/output.html
@@ -0,0 +1,7 @@
+<script context="module"></script>
+
+<script>
+</script>
+
+<style>
+</style>