PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: nix-community/nixpkgs-fmt (rust)
Issue: sample: if then else indent
## Input
```nix
 if
 foo
 then
 bar
 else
 baz

```

## Output
```nix
if
foo
then
bar
else
baz

```

## Desired output

```nix
if
  foo
then
  bar
else
  baz
```

Pull request description: indent if expression
closes #62

bors r+

Patch:
diff --git a/src/rules.rs b/src/rules.rs
index 8a734b9..c449022 100644
--- a/src/rules.rs
+++ b/src/rules.rs
@@ -142,6 +142,7 @@ pub(crate) fn indentation() -> IndentDsl {
             .indent(VALUES)
 
         .inside(NODE_INHERIT).indent([NODE_IDENT, NODE_INHERIT_FROM, T![;]])
+        .inside(NODE_IF_ELSE).indent(VALUES)
 
         // FIXME: don't force indent if comment is on the first line
         .inside(ENTRY_OWNERS).indent(TOKEN_COMMENT)
@@ -228,6 +229,7 @@ static VALUES: &[SyntaxKind] = &[
     NODE_STRING,
     NODE_VALUE,
     NODE_APPLY,
+    NODE_IF_ELSE,
 ];
 
 static BIN_OPS: &[SyntaxKind] = &[


Test patch:
diff --git a/test_data/if_then_else_indent.bad.nix b/test_data/if_then_else_indent.bad.nix
new file mode 100644
index 0000000..f16826b
--- /dev/null
+++ b/test_data/if_then_else_indent.bad.nix
@@ -0,0 +1,13 @@
+if
+true
+then
+1
+else if false
+then
+2
+else
+if true
+then
+3
+else
+4
diff --git a/test_data/if_then_else_indent.good.nix b/test_data/if_then_else_indent.good.nix
new file mode 100644
index 0000000..ec23e99
--- /dev/null
+++ b/test_data/if_then_else_indent.good.nix
@@ -0,0 +1,13 @@
+if
+  true
+then
+  1
+else if false
+then
+  2
+else
+  if true
+  then
+    3
+  else
+    4
Repository: boto/botocore (python)
Issue: Region redirect does not honor scheme
Bucket in us-west-2
```
$ aws s3api get-bucket-location --bucket jamesls-test-sync
{
    "LocationConstraint": "us-west-2"
}
```

Specifying an http endpoint to us standard instead of us-west-2:


```
aws s3 cp /tmp/foo.txt s3://jamesls-test-sync/ --endpoint-url http://s3.amazonaws.com/ --debug
```

I can see we have the redirect logic now, but I can see it getting redirected from http to https:

```
2016-07-08 08:57:31,621 - Updating URI from http://s3.amazonaws.com/jamesls-test-sync to https://s3-us-west-2.amazonaws.com/jamesls-test-sync
```

I would expect that if we're going to change the URl we should still honor the scheme they've requested right?

cc @JordonPhillips 
Pull request description: Honor old scheme when redirecting S3 requests
If the old URL was using http over https, we will no continue to
use http.

Fixes #976
Closes #984

cc @kyleknap @jamesls

Patch:
diff --git a/.changes/next-release/bugfix-s3-36114.json b/.changes/next-release/bugfix-s3-36114.json
new file mode 100644
index 000000000..c15f29889
--- /dev/null
+++ b/.changes/next-release/bugfix-s3-36114.json
@@ -0,0 +1,5 @@
+{
+  "description": "S3 region redirector will now honor the orginial url scheme.",
+  "category": "s3",
+  "type": "bugfix"
+}
diff --git a/botocore/utils.py b/botocore/utils.py
index bf36041a6..4223ed864 100644
--- a/botocore/utils.py
+++ b/botocore/utils.py
@@ -922,7 +922,7 @@ class S3RegionRedirector(object):
     def set_request_url(self, params, context, **kwargs):
         endpoint = context.get('signing', {}).get('endpoint', None)
         if endpoint is not None:
-            params['url'] = _get_new_endpoint(params['url'], endpoint)
+            params['url'] = _get_new_endpoint(params['url'], endpoint, False)
 
     def redirect_from_cache(self, params, context, **kwargs):
         """


Test patch:
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
index 2757ca5e2..68c878726 100644
--- a/tests/unit/test_utils.py
+++ b/tests/unit/test_utils.py
@@ -1000,6 +1000,15 @@ class TestS3RegionRedirector(unittest.TestCase):
         self.assertEqual(
             params['url'], 'https://us-west-2.amazonaws.com/foo')
 
+    def test_set_request_url_keeps_old_scheme(self):
+        params = {'url': 'http://us-west-2.amazonaws.com/foo'}
+        context = {'signing': {
+            'endpoint': 'https://eu-central-1.amazonaws.com'
+        }}
+        self.redirector.set_request_url(params, context)
+        self.assertEqual(
+            params['url'], 'http://eu-central-1.amazonaws.com/foo')
+
     def test_sets_signing_context_from_cache(self):
         signing_context = {'endpoint': 'bar'}
         self.cache['foo'] = signing_context